Hi all,
I have got a problem with the items state in a rule trigger.
There is the item:
Contact doorbell "Klingel betätigt" <contact> { channel="zwave:device:71a23be9:node14:sensor_door" }
and a rule:
rule "Es hat geklingelt"
when Item doorbell changed
then
// ...
end
Everything works fine, but the trigger of this rule is also fired when the system starts up.
To prevent this, I added:
when Item doorbell changed to CLOSED
and I also tried:
when Item doorbell changed from OPEN to CLOSED
But the rule is not executed anymore.
I added:
logInfo("Rules","previousState="+previousState)
logInfo("Rules","currentState="+doorbell.state)
and got:
13:51:00.249 [INFO ] [eclipse.smarthome.model.script.Rules] - previousState=OPEN
13:51:00.254 [INFO ] [eclipse.smarthome.model.script.Rules] - currentState=CLOSED
So I am confused about my failure.
I am using openhabian with the current unstable release openHAB 2.1.0 Build #934.
Does anyone understand what is going wrong?
Thank you in advance, Nico