This used to work about a year ago last summer, but maybe the code needs to be changed from all the HA upgrades.
What I’m trying to do is start a timer when the HVAC unit turns it’s state to cool. If it’s longer than an hour and it’s still cool send a pushover message. Do I have something wrong in my code?
timer:
hvac:
duration: '01:00:00'
- alias: Notify HVAC running long
trigger:
- platform: state
entity_id: sensor.upstairs_thermostat_hvac_state
to: cool
for:
minutes: 60
- platform: event
event_type: timer.finished
event_data:
entity_id: timer.hvac
condition:
condition: state
entity_id: sensor.upstairs_thermostat_hvac_state
state: cool
action:
- service: notify.mypushover
data:
message: HVAC upstairs has been running for 60 minutes
- service: timer.start
entity_id: timer.hvac
Could be a simple indentation error … but we’ll never know until you present it properly formatted.
Either use the </> icon to format it or enter three back-quotes ``` on a separate line just before your code and another three back-quotes on a separate line after your code.
Yes, it should but only after the state has changed to cool and remained in that state for a minimum of 60 minutes.
I’m not 100% certain this will fix the issue, but change this:
to: cool
to this:
to: 'cool'
Also, go to the States page, find automation.notify_hvac_running_long in the list, and confirm its state is on. If it’s off it will never be triggered.