Simple sunrise and sunset script

u can always test rules with TimeCRON

you have 2x “end” at the end of your rule - you need to close each rule with “end” before you start with the next rule

also you have (on) and (OFF) - its case sensitive :wink:

rule "turn outside lighting on"
when
     // Channel ‘astro:sun:local:set#event’ triggered START or
     Time cron "0/5 * * * * ?"        // every 5 Seconds   0:05 / 0:10 / 0:15
then
     Outside_garage_lights.sendcommand(ON)
end

rule "turn outside lighting off"
when
     // Channel ‘astro:sun:local:set#event’ triggered START or
     Time cron "0/10 * * * * ?"        // every 10 Seconds   0:10 / 0:20 / 0:30
then
     Outside_garage_lights.sendcommand(OFF)
end

but maybe you are looking for a “NIGHT STATE” Switch - check this out: