Help with "Notify on HA update available" automation

Hi,
I’m trying to set up a notification to let me know when HA updates, but it ain’t working and I have no idea why:

- id: '1592672526735'
  alias: Notification (html5_turbojeba) on HA update available
  description: ''
  trigger:
  - entity_id: binary_sensor.updater
    from: 'off'
    platform: state
    to: 'on'
  condition: []
  action:
  - data:
      message: New version of Home Assistant is available.
      title: HA Update Available.
    service: notify.html5_turbojeba
  mode: single

it never triggers, I only notice the Updater badge changed when HA update is available.

I have also very similar automation set up for HACS updates, which works flawlessly:

- id: '1593348724453'
  alias: Notification (html5_turbojeba) on HACS update
  description: ''
  trigger:
  - above: '0'
    entity_id: sensor.hacs
    for: '600'
    platform: numeric_state
  condition: []
  action:
  - data:
      message: HACS reports updated repositories available.
      title: HACS Update(s) Available.
    service: notify.html5_turbojeba
  mode: single

Any idea why the 1st one doesn’t work, or how to set the trigger for it so that it does?
Thanks for any insights!

Not sure why it doesn’t work, but have a look at my earlier post about how to set up update alerts:

2 Likes

Thanks, I’ll try to adapt your notifications to my environment and see where that gets me, but nonetheless I think the 1st automation should work and wonder why it doesn’t so that I don’t use the same non-triggering trigger in different automation in the future (like I plan to set a notification when UPS status binary sensor goes to “off” etc).

I’m using this as a work-around:

Automation

- id: update_available
  alias: 'Update Available'
  initial_state: true
  trigger:
    platform: state
    entity_id: sensor.latest_version
  condition:
    condition: template
    value_template: "{{ states('sensor.latest_version') != states('sensor.installed_version') }}"
  action:
  - service: notify.telegram_system
    data_template:
      title: '*Information*'
      message: "An update for Home Assistant is available. You are running {{states('sensor.installed_version') }}, the latest version is {{ states('sensor.latest_version') }}."

Sensors:

- platform: version
  name: Installed Version
  image: intel-nuc
  source: local

- platform: version
  name: Latest Version
  image: intel-nuc
  source: hassio

I have to say I just didn’t have any luck getting this work within HA automation, I created a flow for it in node-red which worked immediately as I got the notify for the 0.113.2 today.

So clearly there’s a bug or something where HA can’t see Updater state is ‘off’, yet the HA node-red palette node can.