please I need some help with rules.
I would like to have the outside light turned on at sunset +15 Minutes and turned off at sunrise -30 Minutes.
So far no problem.
Further I like to get the Garage light turned on, when the Garagedoor are opened and turn off when the door is closed, but only between sunset und sunrise.
The syntax i used just don#t work.
Also in case of a power failure or an reboot the outside light should be on or off depending on night or daytime.
Thx for your help
Code: Select all
On Time#initialized do if %sunset% > %systime% and %sunrise% < %systime% Gpio,13,0 else Gpio,13,1 endif endon On Clock#Time=All,%sunset+15m% do //works Gpio,13,0 endon On Clock#Time=All,%sunrise-30m% do // works Gpio,13,1 endon On Door_open#Switch=1 do if %systime% > %sunset% and %systime% < %sunrise% Gpio,4,0 else Gpio,4,1 endif endon On Door_open#Switch=0 do //works Gpio,4,1 endon