Automation with event 'homeassistant_startup' not called

I tried to setup an action on startup, but it looks like the homeassistant_start event isn’t called. My (simplified) event is as follows:

- alias: Verwarmingsync beneden
  trigger:
    platform: event
    event_type: homeassistant_start
  condition:
    - condition: template
      value_template: '{{ states.climate.danfoss_z_thermostat_014g0013_heating_1_11_1.attributes.temperature == states.climate.danfoss_z_thermostat_014g0013_heating_1_14_1.attributes.temperature }}'
  action:
    - service: notify.notify
      data_template:
        message: 'Testmessage'

I never get the notification when starting or restarting HASS, but when I fire the event using the developer-tools the notification works… What could be the issue here?

I dont think the condition needs a hyphen unless there is a list of conditions.

- alias: Verwarmingsync beneden
  trigger:
    platform: event
    event_type: homeassistant_start
  condition:
    condition: template
    value_template: '{{ states.climate.danfoss_z_thermostat_014g0013_heating_1_11_1.attributes.temperature == states.climate.danfoss_z_thermostat_014g0013_heating_1_14_1.attributes.temperature }}'
  action:
    - service: notify.notify
      data_template:
        message: 'Testmessage'

Also what does the template render in the dev tools?

I think you’re safe to use a hyphen even when you don’t need it.

@ashwin - if you trigger that automation from the UI, does it run? Like @PtP, I wonder if your condition is returning true.

Hi both,

When I trigger the event from the UI, it works like expected (even with the hyphen). The template renders true. I’m starting to think the z-wave devices aren’t loaded yet. I tried to run another event, without the condition, and that works as expected. I replaced the homeassistant_start with zwave.network_ready, and that seems to fix the issue! Would be good to see automations that can’t be completed logged somewhere in the UI, i.e. on the Logbook-page.

1 Like