Restart required notification


How do I trigger a notification/ automation when a Restart is required?

My HA is running smooth and I automatic update my add-on, ESPhome devises and as much as I can.
I know this is not popular :smiley:, but for automation to work, I don’t want to do a lot of admin work to reading release notes, doing updates and restarts.



These events are fired during the startup of Home Assistant, in the following order:

  1. homeassistant_start
  2. homeassistant_started

These events contain no additional data.

If you want to trigger automation on a Home Assistant start event, we recommend using the special Home Assistant trigger instead of listening to these events.

I like to trigger when this happens

Make a binary sensor template using this code

  states.update | 
  selectattr('attributes.release_summary','eq','<ha-alert alert-type=\'error\'>Restart of Home Assistant required</ha-alert>') | 
  list | count

and use that turning on as a trigger or condition :slight_smile:

here’s my automation

alias: Restart Home Assistant
description: ""
  - platform: time
    at: "00:15:00"
  - condition: state
    entity_id: binary_sensor.restart_required
    state: "on"
  - service: homeassistant.restart
    data: {}
mode: single