I have a rule that will turn on the light at 07:00 in the morning. someting like:
Time cron "0 0 7 * * ?"
Which works great, however part of the commands i do in the “then” part is switching on lights.
During winter time that’s great but during summer time sometimes the sun is already up so it’s silly to turn on the lights. I have astro installed and have a “sunrise” datatime however calculating with it doesn’t work very well…
Something as simpel as if (sunrise_date < current_date) didn’t do the trick…
Is my logic ok but syntax wrong or is there an easier way to do this?