#Daylight savings time affecting automations
1 messages · Page 1 of 1 (latest)
I would deal with that buy not scheduling them between 1 and 2 AM. Really, anything I have running at the time is probably a "once in the middle of the night", and 3AM works just avoids this.
Programmer Rant: The amount of wasted energy and productivity lost to dealing with DST far outweighs any benefit it might offer.
There is a small cluster of DST related issues every 6 months, As @burnt otter mentioned, It is a real pain to deal with correctly and as such is a bit of a lower priority.
Our whole hospital's digital records system just schedules a 2 hour downtime around DST rather than deal with it... So much lost 'productivity' as well as delays in patient care because of it.
But I second the idea of not scheduling anything for the DST time change (1am-3am, to cover both directions) if possible
I used to write movie POS and it would bite us every year in so many many ways. I'm a proponent of UTC everywhere.
Yup, I am of the opinion that there is no need for time zones to be a thing. no differences, no DST. UTC only.
Humans are very adaptable. They can manage this.
Best practice, no. As it really depends on how you want to deal with it for the situation.
So when entering DST, you want it not to happen? Or at the change? And when ending DST, do you want it to happen at transition? The first hour? Second hour? Ect. Alle depends on what you want to happen. And for every case you can make trigger and condition to let HA do it 🙂
In this case I want the automation to be DST-resilient, meaning: they trigger whether there is a DST hour change or not.
things like "just set it to an hour that's unaffected by DST" are not a solution, since I want them to happen at that hour...
Of course, if the tradeoff is that it makes the automation overly complex, I'm ok with compromising elsewhere, I was just wondering if HA had some sort of built-in helpers for what, to me, seems like a pretty universal thing across many countries
Outside of HA, within business environment we ensured scheduled tasks avoided the time range covered by clock changes. I’ve also seen many solutions base schedules on UTC time which never changes
WIth "meaning: they trigger whether there is a DST hour change or not." you still don't specify what you want to happen. As the time between 2 and 3 in local time just does not exist when DST is started. And exist twice when exiting DST. So you have to specify what you want to happen.
Then you can make the triggers needed in HA. Yes, makes it a bit complicated but can be done. But the reason there is no "one fits all" solution it makes it hard to have a standard way.
You could trigger at 2am and at 3am, then have a condition to check that it’s been longer than 2 hours since the automation last triggered. It will normally fire twice but the condition will prevent the second run. When clocks jump forward it will only trigger at 3am. When clocks jump back it will fire 3 times but the condition will prevent it from running the second and third times.