In general you can do this by creating a binary_sensor that is ‘on’ if there is a new version. Then the automation would use a state trigger with that binary_sensor and to: 'on', which would only fire when that sensor changes to ‘on’. The problem might be that at startup that sensor will likely, at least temporarily, be ‘unknown’. I would think it should fire when it goes from ‘unknown’ to ‘on’, just as well as when it goes from ‘off’ to ‘on’, but you might need to do some testing/tweaking.
sensor:
- platform: version
- platform: scrape
resource: https://www.home-assistant.io
name: HA Online Version
select: ".current-version h1"
value_template: '{{ value.split(":")[1] }}'
automation:
- alias: HASS Update Available Notification
trigger:
platform: state
entity_id: sensor.ha_online_version
condition:
- condition: template
value_template: '{{states.sensor.ha_online_version.state != states.sensor.current_version.state }}'
action:
- service: notify.pushbullet_notify
data_template:
message: 'There is an update to Home-Assistant: {{states.sensor.ha_online_version.state}} (https://hub.docker.com/r/homeassistant/home-assistant/builds/)'
You may have to change your details depending on how you installed HA but this works and only ever gives me one notification on a new version change, even if I restart HA.