Home Assistant is pushing updates like a maniak . Ofcourse this is a good thing!.
I’d like to keep my instance up-to-date and therefore are looking for a way to make things easy.
I’m using Home Assistant on a tablet with “Custom Header” so there is no big bar on top and no menu on the side.
Question;
Is there a way to make a button that shows me there is an update, and to launch that update from it.
Or use an automation for all types of updates:
First the sensors:
# Sensors
#https://www.home-assistant.io/components/sensor.rest/
#used to determine the exact versions available for my system
- platform: rest
resource: https://s3.amazonaws.com/hassio-version/stable.json
name: Latest Version supervisor
value_template: "{{ value_json.supervisor }}"
scan_interval: 3600
- platform: rest
resource: https://s3.amazonaws.com/hassio-version/stable.json
name: Latest version Hassio
value_template: "{{ value_json.homeassistant.raspberrypi3 }}"
scan_interval: 3600
- platform: rest
resource: https://s3.amazonaws.com/hassio-version/stable.json
name: Latest version HassOS
value_template: "{{ value_json.hassos.rpi3 }}"
scan_interval: 3600
And then the automation with notifications:
- id: new_home_assistant_version
alias: "New Home Assistant Version"
initial_state: true
trigger:
- platform: state
entity_id:
- sensor.latest_version_hassio
- sensor.latest_version_hassos
- sensor.latest_version_supervisor
action:
- service: notify.mobile_app_rene_s_iphone_11
data_template:
title: Upgrade time!
message: >
{% if trigger.entity_id == 'sensor.latest_version_hassio' %}
There is a Home Assistant Hassio upgrade pending!
Version {{ states('sensor.latest_version_hassio') }} just got released!
{% elif trigger.entity_id == 'sensor.latest_version_hassos' %}
There is a Home Assistant HassOS upgrade pending!
Version {{ states('sensor.latest_version_hassos') }} just got released!
{% elif trigger.entity_id == 'sensor.latest_version_supervisor' %}
There is a Home Assistant Supervisor upgrade pending!
Version {{ states('sensor.latest_version_supervisor') }} just got released!
{% endif %}
data:
attachment:
content-type: png
url: https://raw.githubusercontent.com/home-assistant/home-assistant-assets/master/logo-round-192x192.png
- service: persistent_notification.create
data_template:
title: Upgrade time!
message: >
{% if trigger.entity_id == 'sensor.latest_version_hassio' %}
There is a Home Assistant Hassio upgrade pending!
Version {{ states('sensor.latest_version_hassio') }} just got released!
{% elif trigger.entity_id == 'sensor.latest_version_hassos' %}
There is a Home Assistant HassOS upgrade pending!
Version {{ states('sensor.latest_version_hassos') }} just got released!
{% elif trigger.entity_id == 'sensor.latest_version_supervisor' %}
There is a Home Assistant Supervisor upgrade pending!
Version {{ states('sensor.latest_version_supervisor') }} just got released!
{% endif %}