Automations triggering at the Wrong time

OK, this is getting stupid. After upgrading to the latest release (0.97.2) HA has turned to crap. DNS resolution broken, trackers not working, and now automations triggering at the wrong time.

Today my hot water came on in the middle of the night instead of this morning… WTAF ?

The hot water is triggered at 06:55, but it came on at 01:55

1:55 AM hot water daily changed to active
1:55 AM Turn on the hot water in the morning has been triggered
1:18 AM yr Symbol changed to 4
1:01 AM Sun has risen

Triggered from this automation

- id: hot-water-morning-daily
  alias: "Turn on the hot water in the morning"
  initial_state: true
  trigger:
    platform: time
    at: '06:55:00'
  condition:
    condition: state
    entity_id: switch.sonoff_10005045eb_2
    state: 'off'
  action:
    - service: timer.start
      entity_id: 
        - timer.hot_water_daily
        - timer.hot_water_on_switch_bounce
    - service: switch.turn_on
      entity_id: switch.sonoff_10005045eb_2

And yes, the correct timezone is set…

This used to be a reasonable stable platform which I was happy to rely on…, not any more.

What’s your timezone offset?

I’m guessing UTC + 5.

It may be set but there’s something wrong. What do these report in the template editor:

{{ utcnow() }}
{{ now() }}
{{ utcnow().astimezone() }}
{{ now().astimezone() }}
{{ utcnow().tzinfo }}
{{ now().tzinfo }}
{{ now().astimezone().tzinfo }}

The DNS problems were solved 3 days ago. See Name resolution problem since 0.97.2

Hi, output fin the templates editor

2019-08-21 11:19:16.650582+00:00

2019-08-21 12:19:16.650670+01:00

2019-08-21 12:19:16.650802+01:00

2019-08-21 12:19:16.652648+01:00

UTC

Europe/London

BST

The DNS problem was explained, I would not say fixed…, still ignores DHCP settings, and once set manually still pings CloudFair and Quad9 services.

Well your time is all set correctly. So that’s not why it triggered at the wrong time.

As for DNS did you follow this:

Setting your own DNS server
This requires both supervisor 180 and the latest add-ons with CLI v3.1.0

  • hassio dns options --servers dns://IP_ADDRESS
  • hassio dns restart

Well, something to do with the time is off because in the History section of HA it says the Hot Water was on at the correct time…, so the times in the Logbook and History are different.

37

As for the DNS, this is a hack at best. HA should use the DNS servers assigned by DHCP, simple as that. I redirect all ‘rogue’ DNS requests on my network to my local service anyway. Hardcoded IP’s are just not good form…