I’m not getting the expected log output from the Rule below. When the Study door is opened and the Lux level is below 400 the Cabinet lights should turn on. The log output shows what I’m getting. The rule does work as it should, as in the lights come on and switch off it’s just the output to the log for the lights that’s not right. What do I need to change?
rule "Study Door"
when
Item Study_ZW089_Sensor changed
then
if(Study_ZW089_Sensor.state == OPEN) {
if(Porch_ST815_Lux_Level.state < 400) {
Study_Cabinet_Lights.sendCommand(ON)
}
} else {
if(Study_Cabinet_Lights.state == ON) {
Study_Cabinet_Lights.sendCommand(OFF)
}
}
logInfo("org.openhab", "Study: Door {} and the Cabinet lights are {}",Study_ZW089_Sensor.state,Study_Cabinet_Lights.state)
end
2019-08-05 20:00:32.010 [INFO ] [e.smarthome.model.script.org.openhab] - Study: Door OPEN and the Cabinet lights are OFF
2019-08-05 20:00:46.074 [INFO ] [e.smarthome.model.script.org.openhab] - Study: Door CLOSED and the Cabinet lights are ON
2019-08-05 20:02:18.477 [INFO ] [e.smarthome.model.script.org.openhab] - Study: Door OPEN and the Cabinet lights are OFF