Hello,
I’m very new to OpenHAB. I use OpenHAB 2 and try to write a rule for Hue motion detectors.
It looks like this:
rule "Test FLHueMotion"
when
Item FLHueMotion changed
then
if FLHueMotion.state == true
{logInfo(“Motion”,“Test - state = true”)}
else
{logInfo(“Motion”,“Test - state = false”)}
end
For any reason the if statement always returns false.
In the log I see that FLHueMotion changes like this:
2016-11-20 21:03:19.211 [ItemStateChangedEvent ] - FLHueMotion changed from false to true
2016-11-20 21:03:29.521 [ItemStateChangedEvent ] - FLHueMotion changed from true to false
2016-11-20 21:03:19.780 [INFO ] [clipse.smarthome.model.script.Motion] - Test - FLHueMotion state = false
2016-11-20 21:03:29.550 [INFO ] [clipse.smarthome.model.script.Motion] - Test - FLHueMotion changed
2016-11-20 21:03:29.551 [INFO ] [clipse.smarthome.model.script.Motion] - Test - FLHueMotion state = false
What do I wrong?
Any help would be greatly appreciated.
Thanks