Wrong tod after DST End (Clock Backward)

#BUG

# Evening
- platform: tod
  name: Evening
  after: sunset
  before: "23:00"
  unique_id: evening

# Night
- platform: tod
  name: Night
  after: "23:00"
  before: sunrise
  unique_id: night



image

FYI:
DST End (Clock Backward)
Sunday, October 29, 4:00 am

Hi, Same issue, just after the transition to winter time

binary_sensor:
  - platform: tod
    name: HC nuit
    after: "00:54"
    before: "07:24"
    unique_id: 31cdc564-f6fe-4d71-ae81-0c583b23fa65

Also, the “before” attribute seems stuck with bad hour :

after: 2023-10-30T23:54:00+01:00   <= not ok
before: 2023-10-31T07:24:00+01:00
next_update: 2023-10-30T23:54:00+01:00   <= not ok
friendly_name: HC nuit
1 Like

An ugly workaround…

  1. change the entity_id + restart HA : which has the effect of creating a new entity whose name ends with _2, but the attributes have the right values
  2. delete the old entity + change again the entity_id + restart HA : we then find the entity with correct attributes

In my case :

after: 2023-10-31T00:54:00+01:00   <= ok
before: 2023-10-31T07:24:00+01:00
next_update: 2023-10-31T00:54:00+01:00   <= ok
friendly_name: HC nuit

Anyway, something weird happens when changing time, especially when the tod integration determines the time of the next update.