Just a somewhat humorous rant about the time change and HE.
I have a light in my living room that comes on at 6 am and goes off at sunrise. Got up this morning, way too early due to time change, and walked out into living room. Stubbed my toe as light wasn't on.
After a couple cups of coffee to get my brain working I finally figured it out. The sunrise was calculated yesterday evening before the time change, so thus the schedule for light off was set. And then the time changed and the light went off an hour early.
This rant is not against HE, it's against the ******* that still want to change the time twice a year.
I agree - It's just stupid to do this. If we want to start this or that earlier or later depending on the season, we could just do that. But instead, we rearrange the whole - oh, no, wait - just most, of the country. What the _ ?
How we are the dominant species is still a matter of amazement to me.
This is why I have exposed my time of day routines via virtual switches. Just like modes I can set the flags that control my automation. Sitting in my office with the sun coming in the window all my Dawn lights came on. Clicked one switch in the dashboard and things were back to normal until the sunrise/sunset variables are corrected the next day.
Even my weather station was having issues yesterday, I get an extra Sunday:
Did you just set this up yesterday? Was it before sunrise, or right at sunrise? Unless you (a) set it up yesterday, and (b) it was for before sunrise, it should have worked. We aren't hearing of a lot of failures this morning wrt DST change, so I'm hopeful we may finally have gotten this working right.
I have Mode Manager configured to change the Mode from Night to Day at Sunrise every monring and it didn't change this morning. Not a huge deal, but just FYI
Didn't mean to cause quite a stir. Just mainly kibitzing about the time change.
I guess I should explain what I have going on. Way back when, probably a year or more ago, I set up a custom app to turn on a virtual switch at sunset and off at sunrise. I then use this switch several places.
The app worked fine except over the course of a few days I noticed the time wasn't changing. Sunrise and Sunset got scheduled ok, but it was always the same time as it was first scheduled. I attributed this to me not really understanding how it all worked.
So I changed my app. When it runs the sunset routine it reschedules the sunrise. And vice versa. That has worked great all this time so I really didn't think much more about it. Thus last night when it ran the sunset routine it scheduled the sunrise based on last night.
So if there was something initially wrong with the sunrise or sunset I didn't realize it and since my method worked ok, I didn't worry anymore about it.
Not only that but the US decided in 2006 or 2007 to shift our DST switch over date a week different that before. While the EU is still at the old change date. So right now EU is still in standard time. Of course what would we expect, the rest of the world in in metric.
No, that just gets an event at sunrise/sunset. After sunrise/sunset is easy, because you get that event and just runIn() so many seconds later. Before is trickier. There are two more events of interest: tomorrowsSunrise and tomorrowsSunset. Each of those comes right after sunrise and sunset as appropriate, and give the date object for tomorrows event. So before sunrise takes getting tomorrowsSunrise and subtracting some number of minutes from it.