HA Update Notification Issues

Hello,

I am looking to get a notification when a new core update is available. The code I have currently works great if I update to that version.

If I am on 2022.7.0 and 2022.7.1 is released the trigger works perfectly.

If I don’t update to 2022.7.1 and 2022.7.2 is released, I don’t get a notification. What can I do to get a notification when a new release is pushed out? After thinking about this, it does not really matter what version I am currently on.

- alias: Update notification
  initial_state: true
  trigger:
    - platform: template
      value_template: "{{ states('sensor.home_assistant_versions') != states('sensor.current_version') }}"
  action:
    - service: notify.bullet
      data:
        title: "Software Update"
        message: "Home Assistant {{ states('sensor.home_assistant_versions') }} is available."

Try this
It should trigger on all changed in sensor.home_assistant_versions

- alias: Update notification
  initial_state: true
  trigger:
    - platform: state:
      entity_id:
        states('sensor.home_assistant_versions')
  action:
    - service: notify.bullet
      data:
        title: "Software Update"
        message: "Home Assistant {{ states('sensor.home_assistant_versions') }} is available."

Should it be this instead?

  trigger:
    - platform: state:
      entity_id: sensor.home_assistant_versions

Oops. Good spotted.
I edited the original post without the possibility to test it on a HA installation. :slight_smile:

No worries! Thank you again!!!

I am not normally making this in HA itself, but rather in Node-Red.
There can be some issues when HA restarts, because the state then might change to unavailable for a moment and that is a state change too, so the trigger will occur.