I have a mains-powered device with a digital clock that doesn’t adjust to DST (Daylight Savings Time), and the way to modify the time is slightly irksome, causing very mild annoyance every six months. However, if there’s a power cut, the clock immediately resets to 00:00. Therefore, I thought of hooking the device up to a smart plug/relay, and having an automation run whenever DST changes to cut power to it so that the clock changes to the correct time.
After doing some quick calculations, I realised that I would need to cut the power at different times to get it to show the correct time. When DST kicks in, I would need to cut and restore the power at 23:00, so that the clock jumps an hour ahead to 00:00. When DST ends, I would need to cut and restore the power at 01:00, so that the clock jumps back to 00:00. So this automation would also need to offset the time of the actual DST change and technically run a little bit before DST officially changes.
Through the search function I found this post by someone who made a DST sensor which seems to provide several useful attributes:
However, I’m not sure how to do the time offset to make sure it runs before the actual DST change and at different times depending on if DST is about to start or end.
Are you saying the DST changeover date and time isnt the same every year?
Can’t you set an automation to run once every year, one for DST on, and another for DST off?
Making and tracking a DST sensor for the rest of the year seems a little overcomplicated.