Hey,
I try to realize a rule for a blinking light and found a very useful skript here in the forum.
Now I tried to realise a query within this blinking rule which store the blinking light start state.
rule “blinklicht”
when
Item lampe_garten changed from OFF to ON
then
var i = 1
while ((i=i+1) < 7) {
sendCommand(garten_pavillon,ON)
Thread::sleep(500)
sendCommand(garten_pavillon,OFF)
Thread::sleep(500)
}
if(RememberState == ON) {
sendCommand(garten_pavillon,ON)
} else {
sendCommand(garten_pavillon,OFF)
}
end
The part with the blinking runs, but the RememberState has no function. RememberState is a switch which is On or OFF. Is my try with the
if(RememberState == ON) { …
wrong?