alias: Update Available Notifications
initial_state: 'on'
trigger:
platform: state
entity_id: sensor.latest_version
condition:
condition: template
value_template: "{{ ( states('sensor.latest_version') | string ) != ( states('sensor.current_version') | string ) }}"
action:
- service: persistent_notification.create
data:
title: "Update Available"
message: |
Update for Home Assistant is available. {{ states('sensor.latest_version') }}
[Home Assistant Dev Blog](https://home-assistant.io/blog/)
[Updating Home Assistant](https://www.home-assistant.io/docs/installation/updating/)
[Release Notes](https://github.com/home-assistant/home-assistant/releases)
And the 2 sensors:
- platform: version
- platform: rest
resource: https://pypi.python.org/pypi/homeassistant/json
name: Latest version
value_template: '{{ value_json.info.version }}'
scan_interval: 3600
But the condition on the automation doesn’t seem to be working, I always get the persistent notification shown even when the current version matches to the latest version,
I use the above referenced updater sensor and put the resulting updater.updater entity on my main view. When there is an update it will pop up letting you know it’s available.