Starting seeds indoor and keeping the plants "cycle" to the sunrise and sunset along with minimum on rules are escaping me with rule machine.
On my Stargate I used to be able to calculate the number of minutes of daylight and if it was less that 9 hours then I would run the lights for 9 hours. If the number of minutes of daylight exceeded 9 hours I would shut the lights down at sunset.
Looking for a way in Rule Machine to calculate the minutes of daylight so I can build off conditions for the plant lights.
Do you have anything else in your setup that is triggered by sunset and can be used to test against? For instance, I have a mode change at sunset which I could use after nine hours to see if sunset had already occurred. If it hasn't then I could wait until it does. Doing something like this avoids having to bring in another external API or/and doing crazy variable math that I have never been comfortable with.
Just an idea.
Oh that is a great idea...the delay is the 9 hour timer and if it's not sunset yet leave the lights on. Doh! I have a very good time of daylight rules:
Dry run of plant lights worked, here are my rules. I also added a safety rule to my "Sleep" mode being set. If the plant lights are still on when sleep triggers I turn them off. This comes in handy when I turn the lights on manually outside of the rule: