Stop asking about Hassio versions.....Automate it

I see way to many people asking about what the latest hassio version is or when it will be available. Hassio versions are generally available within 1 day after the main branch release. This is due to having to make the hassio build which just takes time.

To find out when a new version is available for your specific Hass.io build, create the following sensor.


#https://www.home-assistant.io/components/sensor.rest/
sensor:
  - platform: rest
    resource: https://s3.amazonaws.com/hassio-version/stable.json
    name: Latest Version
    value_template: "{{ value_json.homeassistant.default }}"
    scan_interval: 3600

This sensor will check once an hour for new version. Adjust ‘scan_interval’ to change this timeframe. The interval is in seconds. (3600 seconds = 60 minutes = 1 hour)

You need to change "{{ value_json.info.default }}" to match your build type. The json output showing all the options is below.

{
  "channel": "stable",
  "supervisor": "138",
  "homeassistant": {
    "default": "0.81.5",
    "qemux86": "0.81.5",
    "qemux86-64": "0.81.5",
    "qemuarm": "0.81.5",
    "qemuarm-64": "0.81.5",
    "intel-nuc": "0.81.5",
    "raspberrypi": "0.81.5",
    "raspberrypi2": "0.81.5",
    "raspberrypi3": "0.81.5",
    "raspberrypi3-64": "0.81.5",
    "tinker": "0.81.5",
    "odroid-c2": "0.81.5",
    "odroid-xu": "0.81.5"
  },
  "hassos": {
    "ova": "1.12",
    "rpi": "1.12",
    "rpi0-w": "1.12",
    "rpi2": "1.12",
    "rpi3": "1.12",
    "rpi3-64": "1.12",
    "tinker": "2.2",
    "odroid-c2": "2.2"
  },
  "hassos-cli": "7"
}

Now to get a notification when a new version is available.

  - alias: "New Home Assitant Version"
    trigger:
      - platform: state
        entity_id: sensor.hassio_version
    action:
      service: notify.notify
      data:
        title: "New Home Assistant Version"
        message: "Version {{ states.sensor.latest_version.state }} is available!"

Adjust the notify service to match your notification service.

Note that if you get the notification and go to the Hass.io menu you may not have the version showing as available. Hass.io only checks a few times a day in my experience. You will have to wait or perform the update manually via the command line.

6 Likes

This is great for those that are CONSTANTLY desperate to have the latest… but unless something got broken in a release I don’t understand why people cant just be patient. I generally wait until the 0.xx.2 version so that anything that broke in the 0.xx.0 has been fixed. Some people seem very pushy for a product that is FREE.

Thanks for your input though, hopefully it will calm a few people down… (rant over)

2 Likes

I agree. This is for those that want to know if version x.xx.x is out for Hassio yet.

I tried to not rant about people upgrading for no reason and not reading the release note first and understanding what changes were made.

Well I was wondering why this was needed also - until I read the op’s last paragraph. Since my install - when I goto the hassio menu - it shows the update that is avail and which version it is and a link to the release notes.

So if I understand this correctly - this is for ppl that can’t wait for that update notification to show up? Which is potentially only a few hours from the actual time it was physically avail to download? (Since the hassio interface only checks a few times per day)

Yes, basically. There are tons of questions on the forum and the discord chat about is x.xx.x available on hassio yet. Sometimes its people who upgraded, find out a fix to there problem is in x.xx.x+1 and want the update rather than just downgrading and waiting. Others just seem to need to have the latest. Im with sparkydave, stay a little behind and its generally smooth sailing.

That awasome, can someone help putting the value template, I’m on hassos on rpi3

Assuming you are on the 32 bit version.

Whilst I rarely update straight away either, I do have this information displayed on my system page.

Is it possible to interrogate the currently installed HassOS?

thank you very much

This people find the issues in the new releases, so you can savely install 0.xx.2.

3 Likes

This.

We’re all basically beta testers for this software, and the quicker we get together and find bugs the better it is for everyone.

2 Likes

You have a typo here in your automation. Your sensor is named ‘Latest Version’ so your automation should use

sensor.latest_version

Thank you for posting this by the way. Very useful!

Thanks. Fixed.

Thanks @silvrr although strangely, it hasn’t updated in my browser when I hit refresh.

There is also the version sensor :

I use the version sensor to see if a new version is available with code from @Frank (browsed through his config as he posted it) which he posted in github. That one gives you the Hassio version. It would be great if the version sensor could be extended with the supervisor and then it´s all part of standard and no rest command with templates would be needed (just to make it simpler).