JalousienOG?.members.filter( x | x.state != 100 && x.name != "Jalousie_OG_Buero_Loggia").forEach[ item | item.sendCommand(100) ]
Now I want to count, how many items were really changed.
But I don’t get it to insert a counter in the code.
I may be wrong, but I think, vars which are defined outside the lambda aren’t allowed. But of course you could use an item to count up (ore use the latter term).
rule "H_Beschattung_tmp" when Time cron "0 * * ? * *" then var o = JalousienOG?.members.filter( x | x.state != 80 && x.name != "Jalousie_OG_Buero_Loggia") var i = o.size LogInfo.postUpdate(i.toString + " Objekte.") end