Like most people here most of my pistons revolve around Sunset and the next morning’s Sunrise. I’ve been using the variables $sunset and $nextsunrise for most of them, but wonder if I’m making things too complicated?
Do any of the Sunset and Sunrise variables ($sunrise, $sunset) or the Presets (when Time is selected as the virtual device) take into account the date change at midnight?
For example, it’s 8pm where I’m at now and pitch black outside. However, sunrise was at 7am and sunset was at 5pm - so the time now is actually NOT between sunset and sunrise for today. It is between sunset and the next sunrise though, so the pistons that have my lights on now use $sunset and $nextsunrise. After midnight though, I want the lights to turn off on that day’s Sunrise, so the variables shift from $nextsunrise to $sunrise.
I believe my logic is accurate but wonder if there’s something in WebCoRE that takes some of the headache out of this, and I’m not taking advantage of it? Feel free to tell me if I’m just making it too complicated, too! lol