I have rule, that checks if the state of group item has changed and if group item is OPEN or CLOSED. I am getting error when the rule is executed:
Exception while formatting value ‘OPEN’ of item gMotionSensors
my rule:
rule “Motion detected”
when
Item gMotionSensors changed
then
if (gMotionSensors.state != OPEN) {
MotionAlarm.sendCommand(OFF);
} else {
MotionAlarm.sendCommand(ON);
}
end
May we see the complete WARN message?
I don’t think this has anything to do with a rule; your UI probably is updating as well when the group state changes?
You can’t format states OPEN and CLOSE with %d
%s will work.
In OH2, %d had a magic special case for Switch andContact type Groups of producing a count of matching Items.
I don’t think magic %d is available in OH3.