Pi4b, OH 2.5.12
I do have a rule in use and the problem that it ignores me (is it my wife?)
OK serious, I do use two ifs and I thought the first if will overrule the following ifs, but it doesn´t!
“Night” is a dummy switch and gets the value by the astro binding.
So currently “Night” is “OFF” (I checked) but the LEDs get switched - Why?
Do I have a misunderstanding here?
if(Night != OFF) {
if(LED1.state != ON) {
LED1.sendCommand(ON)
LED1_Timer = createTimer(now.plusSeconds(240), [|
LED1.sendCommand(OFF)
])
}
if(LED2.state != ON) {
LED2.sendCommand(ON)
LED2_Timer = createTimer(now.plusSeconds(240), [|
LED2.sendCommand(OFF)
])
}
}