Hi, is there example for doing if statement in openbk?
In tasmota, i have this rule where single press from button 1 would only toggle relay 1 if wifi is online & relay 3 is on
How do I do something similar in the script?
In tasmota, i have this rule where single press from button 1 would only toggle relay 1 if wifi is online & relay 3 is on
rule1
on wifi#connected do var1 online endon
on wifi#disconnected do var1 offline endon
on switch1#state do publish switch1 %value% endon
on switch1#state=2 do IF ((%var1%=online) AND (%power3%==1)) power1 toggle ELSE power3 toggle ENDIF endon
How do I do something similar in the script?