I’ve had an automation to turn my hot water on and off for the last year and yesterday/today it just stopped working. I look in the Logbook and can see the timer finishing event:
6:06 PM hot water daily changed to idle
and the matching automation:
- id: hot-water-timer-finish
alias: "Turn off Hot water when timer finishes"
initial_state: true
trigger:
- platform: event
event_type: timer.finished
event_data:
entity_id:
- timer.hot_water_boost
- timer.hot_water_daily
action:
- service: switch.turn_off
entity_id: switch.sonoff_hot_water
This has been working for over a year, but now has just stopped, no errors etc, the automation just doesn’t trigger…
Petro may have hit this nail on the head, but do you really want the end of the boost shut the heater off if the daily is still on ? Should you not have a condition ?
Yes it’s turned on !, and the boost timer will not activate if the daily timer is running. But this is beside the point, why has this automation stopped working ???
I’m sorry, we are trying to help.
How does the daily stop the boost ?
The point here being that ‘something’ has caused a change in behaviour and unless we know more we can’t point you at possible solutions.
So do we have all relevant configuration ?
You understand that no one here is employed by HA and as you paid nothing for the software you are merely reliant upon the kindness of strangers ?
Petro suggested that you may have inadvertently switched the automation off. The number of times that happens is almost unbelievable. But if you are happy to take it from here we’ll understand.
Good luck
Sorry if I was a bit short, but how the boost timer works is totally irrelevant in this case, on , off, it doesn’t make a difference to how this automation should run, there are no conditions, I get an event in the log to say the timer has finished, but this does not run. I can manually start and stop the timer, it still doesn’t run. The only thing that has changed its the latest release of HA.
So, automations with single timers in the trigger clause still work, any that have more than one no longer work. I wrote separate automations with 1, 2 and 3 timers to confirm that this is the case.
He said he tried one entity_id. I also tried one yesterday on 0.105b and it wasn’t working. Something definitely changed. But I put about zero effort into seeing what changed and put all the effort into finding an automation that would work.
I thought he said he tried with one timer event trigger with one entity_id and it worked. I didn’t realize he used two different timer event triggers with one entity_id each and it wouldn’t work.
I don’t know if he meant that. That’s what I gathered from his post. But I went ahead and tried it myself and it wouldn’t work when I specified ‘enitity_id’ inside ‘event_data’. No matter how many entity_id’s you have.
- alias: test timer finished event
initial_state: 'on'
trigger:
# run when restart timer has finished
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.garage_lights_timer
condition:
# only run if alarm clock is active
- condition: state
entity_id: input_boolean.bool_16
state: 'on'
action:
# restart alarm, first_run false so no delay in alarm sounding
- service: input_boolean.turn_on
entity_id: input_boolean.bool_17
I started the already existing timer manually and when the timer finished the input boolean turned on as expected.
So I’m not sure what isn’t working?
EDIT: wait, are you guys both on v104 already?
if so then that’s bold. I never update until all of the wrinkles get ironed out.
I just ran into the same issue with my trigger not firing with the timer.finished event under v107.4 and found this thread to provide some direction on debugging. Good news is that it appears this is now working as of v107.4, at least with a single entity_id wrapped by event_data (I have not tested multiple entity_ids). I had borrowed some trigger logic for someone else in the HA community that wasn’t formatted as the examples given above. Bottom line for other’s seeing this in v104, it’s been fixed!