Hi,
I’ve tried have a rule triggered by an update of a certain value, like this:
val int STATUS_DISARMED= 0
rule "Alarm Condition"
when
Item Alarm_State received update STATUS_DISARMED
then
logInfo("rules", "update DISARMED")
end
doing:
Alarm_State.postUpdate(STATUS_DISARMED)
It doesn’t trigger the rule. However, replacing STATUS_DISARMED
with its value, it triggers.
val int STATUS_DISARMED= 0
rule "Alarm Condition"
when
Item Alarm_State received update 0
then
logInfo("rules", "update DISARMED")
end
One way to overcome this, would be add an if
clause in the beginning of the then
block testing the value, and the trigger would be without value.
Anyone has a suggestion to overcome this, in the cleanest way possible?
Thanks.