Hi,
I’m finally migrating to openHAB 3, thanks to the authors!
When I try to use the same rules I was using with openhab2.5 I have an issue with:
Group BateriaSensors "Batteries Group" <batterylevel>
rule "Low Batteries Sensors"
when
Member of BateriaSensors changed
then
BateriaSensors.members.filter[item | item.state < 16].forEach[items|
val mailActions = getActions("mail","mail:smtp:domovilasmtp")
val telegramAction1 = getActions("telegram","telegram:telegramBot:telegramdomobot")
var MessageBatSensors = ("Change " + item.label)
telegramAction1.sendTelegram(MessageBatSensors)
mailActions.sendMail("xxxxx@gmail.com",MessageBatSensors,MessageBatSensors.toString)
]
end
[ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'alarm-11' failed: The name 'item' cannot be resolved to an item or type; line 183, column 47, length 4 in alarm
where the column 47+4 is “item” in (var MessageBatSensors = ("Change " + item.label))
Could you help me with that please? What should I change with my filter rules since openHAB 3?
Thanks,
Travix