outdoor lights go on every morning at 6:30 am and out on sunrise.
two rules - works no problem.
rule "buitenlicht aan ochtend door de week"
when
Time cron "0 30 6 ? * MON-FRI"
then
sendCommand(nb_s2_12_bl_hek, ON)
end
and
rule "buitenlicht uit ochtend"
when
Channel 'astro:sun:e89f7bb8:rise#event' triggered START
then
sendCommand(nb_s2_12_bl_hek, OFF)
end
working like this from oktober orso. But now while sunrise is getting earlyer and earlyer i looked up that around june sunrise will be earlyer than 6:30 am.
How can i make the on rule so that he checks when sunrise is and if it’s before 6:30 it doesn’t go on ?
rule "buitenlicht aan ochtend door de week"
when
Time cron "0 30 6 ? * MON-FRI"
then
if (sunIsUp.state == OFF) {
nb_s2_12_bl_hek.sendCommand(ON)
}
end
rule "buitenlicht uit ochtend"
when
Channel 'astro:sun:e89f7bb8:rise#event' triggered START
then
nb_s2_12_bl_hek.sendCommand(OFF)
sunIsUp.postUpdate(ON)
end
rule "sunset"
when
Channel 'astro:sun:e89f7bb8:set#event' triggered START
then
sunIsUp.postUpdate(OFF)
end