Dear all,
I am trying solve the following problem:
After dawn (using the Astro Binding), I want to close my rollershutters ONLY if it is after 6 pm. If it is before 6pm, I want to wait until 6pm and then close the rollershutters.
I do NOT want to use the earlierst/latest configuration of the Astro binding because I want to state the logic explicit in the rules instead of “hiding it away” in some configuration. And I want/need to practice my rule coding skills.
This is what I have done so far and it is working fine:
rule "Shutter Evening"
when
Channel 'astro:sun:local:set#event' triggered END
then
gRolShutters.sendCommand(DOWN)
end
Use a rule that triggers at 6 pm (using cron) and close the rollershutter only if dawn has happened and another rule that triggers at dawn and close the rollershutter only if the actual time is after 6 pm.
Such behaviour has been build into the binding, but you don’t want it…