Automation timing out?

I have an automation that turns my thermostat off for one hour then turns it back on (I need a failsafe incase this very thing happens in any way). For some reason even when HASS is running fine part of this automation doesn’t fire? It’s strange. To be clear this works 90% of the time. Here is the automation.

- alias: 'Thermostat - Open the windows'
  trigger:
    - platform: template
      value_template: '{{ states.sensor.dark_sky_wind_speed.state|float > 4 }}'
  condition:
    condition: and
    conditions:
      - condition: template
        value_template: '{{ (states.sensor.bedroom_temperature.state|float + states.sensor.thermostat_temperature.state|float) / 2 > 74 }}'
      - condition: state
        entity_id: group.people
        state: 'home'
      - condition: or
        conditions:
          - condition: template
            value_template: '{{ (states.sensor.thermostat_temperature.state|float - states.sensor.dark_sky_temperature.state|float) >= 3 }}'
          - condition: template
            value_template: '{{ (states.sensor.bedroom_temperature.state|float - states.sensor.dark_sky_temperature.state|float) >= 3 }}'
  action:
    - service: notify.pushbullet
      data_template:
        target:
          - device/Galaxy S7
          - email/*******@gmail.com
          - email/**********@gmail.com
        message: >
          It's cold enough outside to turn off the AC, so open some windows!
          It's {{ states('sensor.thermostat_temperature') }} degrees in the house and {{ states('sensor.bedroom_temperature') }} in the bedroom.
          Outside it's {{ states('sensor.dark_sky_temperature') }} degrees with {{ states('sensor.lateral_wind_direction') }} wind @ {{ states('sensor.dark_sky_wind_speed') }} mph.
    - service: notify.kitchen_tablet
      data_template:
        message: >
          It's cold enough outside to turn off the AC, so open some windows!
          It's {{ states('sensor.thermostat_temperature')|round|int }} degrees in the house and {{ states('sensor.bedroom_temperature')|round|int }} in the bedroom.
          Outside it's {{ states('sensor.dark_sky_temperature')|round|int }} degrees with {{ states('sensor.lateral_wind_direction') }} wind @ {{ states('sensor.dark_sky_wind_speed')|round|int }} mile per hour.
    - service: input_select.select_option
      entity_id: input_select.thermo_hvac
      data:
        option: 'Off'
    - service: homeassistant.turn_off
      entity_id: automation.just_open_the_damn_windows
    - delay:
        hours: 1
    - service: homeassistant.turn_on
      entity_id: automation.just_open_the_damn_windows
    - service: input_select.select_option
      entity_id: input_select.thermo_hvac
      data:
        option: 'Auto'
    - service: notify.pushbullet
      data_template:
        target:
          - device/Galaxy S7
          - email/******@gmail.com
          - email/*********@gmail.com
        message: >
          I'm turning the Thermostat back to Auto
          It's {{ states('sensor.thermostat_temperature') }} degrees in the house and {{ states('sensor.bedroom_temperature') }} in the bedroom.
          Outside it's {{ states('sensor.dark_sky_temperature') }} degrees with {{ states('sensor.lateral_wind_direction') }} wind @ {{ states('sensor.dark_sky_wind_speed') }} mph.

So the issue is at least this time, that the automation was turned back on but not the thermostat. Could this be an API call issue? I have been getting the following error since .48.1…
`[pyecobee] Error connecting to Ecobee while attempting to get thermostat data. Refreshing tokens and trying again.

Could that have something to do with it maybe? My ecobee occupancy sensors are back now with this update so there’s that. Any insight would be appreciated.

I think I might get rid of the on/off automation part and just use something like this as a further condition?
{% if as_timestamp(now()) | int - as_timestamp(states.automation.notify__critical_device_offline.attributes.last_triggered) | int > 3600 %} true {% else %} false

And maybe rely on a separate automation for turning the thermostat back on at an appropriate time? This could be a more robust system. Still confused as to why it isn’t running properly in the first place though.