Hi to all,
When using automation triggers, my automation fires 1 hour too soon.
When I check this template in dev mode, time is correct
{{ now() }}
{{ utcnow() }}
Time in HassOS is also correct.
Automation using Node Red fires at the correct time.
Any other ideas ?
Troon
(Troon)
May 5, 2023, 2:42pm
2
What time zone are you in? Please paste in the YAML code for an automation that is running too soon — correctly formatted.
(GMT-05:00) Eastern Time
alias: Éclairage Cour Arrière - Soirée Régulier
description: ""
trigger:
- platform: sun
event: sunset
offset: "00:05:00"
id: Eclairage_Soiree_Regulier
- platform: time
at: "23:30:00"
condition: []
action:
- if:
- condition: trigger
id: Eclairage_Soiree_Regulier
then:
- service: scene.turn_on
target:
entity_id: scene.eclairage_cour_arriere_soiree_regulier
metadata: {}
else:
- service: scene.turn_on
target:
entity_id: scene.eclairage_cour_arriere_jour_off
metadata: {}
mode: single
Troon
(Troon)
May 5, 2023, 3:00pm
4
And that’s triggering at 22:30? Can you paste in an Automation Trace for it like this:
That’s from my very simple automation:
alias: Hot water - immersion heater on
description: Immersion run in Go cheap period
id: 24d45bfd-fd24-48b6-a6ff-02c3562745b2
trigger:
- platform: time
at: '03:50:00'
condition:
- condition: state
entity_id: input_boolean.hot_water_enable
state: 'on'
action:
- service: switch.turn_on
entity_id: switch.immersion_switch_relay
petro
(Petro)
May 5, 2023, 3:04pm
5
What do these output?
{{ now() }}
{{ utcnow() }}
I know you said “they are correct” but I’d like to see what they output please.
Result type: string
2023-05-05 11:35:29.708586-04:00
2023-05-05 15:35:29.708604+00:00
This template updates at the start of each minute.
petro
(Petro)
May 5, 2023, 3:39pm
7
Yep, thats correct.
So which trigger is off by an hour? Platform Time or Sunset?
Damn … found it !
Sorry about that guys, I can delete the whole post lol
Automation trace was good
When looking at the graph, I realised the OFF script was called 2 times. I had an old Node Red from a previous test firing it at 22h30
1 Like
Troon
(Troon)
May 5, 2023, 4:14pm
9
so easily done. Glad it’s sorted now.
1 Like