HVAC timer

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.

sorry was fixing the post

What’s wrong? Does the automation fail to trigger? Does all or part of the action fail to work?

it seems when the HVAC state goes to cool it does not start the timer.

OK, so the state of sensor.upstairs_thermostat_hvac_state must change to cool in order to trigger the automation.

Please post the configuration for this sensor. I assume it is a Template Sensor?

it was a sensor created by a nest thermostat.
going back through an old post I had when I used alerts
old post

When you look in the States page, what is that sensor’s current state?

Off. Shouldn’t the timer start when the state changes to cool?

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.

I think the ‘cool’ did it. Thanks!