British Summer Time

Oh boy, here we go again.

So now that we have just gone into British Summer Time here in the UK, HA seems to be running 2 clocks.

I have an automation that I had set to 23:59 and it was working fine. Now we have gone on to BST it triggers at 00:59, which is too late. In the Trace it tells me that it triggered at 00:59 yet in the Automation it still says to trigger at 23:59. Conclusion - HA is running some stuff on BST and other stuff on UTC

So I did a bit of research and set up a Time entity. A few minutes later I looked at its history. Here’s the screen shot…
HA Time Entity (2)

At, say, 16:37, it happily tells me the time was 15:37. I cannot be the first.

So what rabbit hole do i need to run down now to sort this out?

There are indeed 2 time used in HA:

  • The time handled by HA itself, which is, afaik, always right
  • The time handled by python itself, through the system. That one depends on the clock of you OS.

Long story short: you system time is likely wrong.

I’m running on a Raspberry Pi4 with the HA OS 7.5 and HA 2022.3.7 (although I see there’s 2022.3.8 out now).

So what do I need to do? I can think of some things, like create a binary sensor that I can set true if BST and then do some templating on my trigger times. But, it really shouldn’t be this difficult.

Sorted I think.
I had time_zone: set to Greenwich instead of Europe/London.

if i run this in templates I get 07/07/22 05:08 ( it’s 6:08 currently)
{{ states.device_tracker.marks_phone.last_changed.strftime("%D “”%H"":""%M") }}

{{ now().tzinfo }} shows Europe/London

my debain shows correct time with the date command
as to does the homeassisant docker

any ideas?