Update notifications! Core, HACS, Supervisor and Addons (now a blueprint!)

Just wanted to say thank you (again) and make a short review what I’ve built based on this.

I can strongly recommend this topic (Update notifications! Core, HACS, Supervisor and Addons).

I‘ve built everything based on this topic. HA, HASS OS, Supervisor, Supervisor Addons, HACS, deCONZ, router, Shelly devices, … created my own for Pi-Hole, Nextcloud (apps and server), … afterwards. And I even remotely update APT packages of other servers - everything from Home Assistant.

Process is always the same:

  1. Get current version info
  2. Get latest version info
  3. Compare current to latest, create update switch
  4. Visualize it in the UI
  5. Create notification automation
  6. Optional: Create update switch

In my case I have a dedicated update section for all HA stuff and integrated systems, where only updates are shown. If there are no updates, the section is invisible.

Took me quite some time but I‘m very happy with that setup.

Example screenshots taken from the mobile app:

As you can see I need to spend half an hour or so on the weekend to do some updates :wink:

For notifications part: I send them to mobile devices using HA Companion app (once) as I personally don’t like the persistent notifications. My persistent notification is the whole update section in the UI.

6 Likes

Maybe a stupid question.
Pasted config from the firs post to packages/updater.yaml
Check config says:
expected a dictionary for dictionary value @ data[‘packages’][‘sensor’]

What am I missing?

How are you including packages in your configuration? Like somewhere in your config there should be something like:

homeassistant:
  packages: <what is here?>

Yes I have

homeassistant:
  packages: !include_dir_merge_named packages

And I have working package. So I created a new yaml file and pasted the package config there

If you are using include_dir_merge_named then you will need to modify the YAML you pasted in. The way include_dir_merge_named works is detailed here.

The file’s name is not taken into account with that include mechanism, its basically just taking the content of the file and putting it directly under packages. Which is why HA is confused why your package called sensor appears to be a list, not a dictionary. Adjust updater.yaml like this:

update_notifications:
  <paste package details here, indent everything one extra>
1 Like

Hi, I have the same problem.

When i trying to put my “supervisor_updates.yaml” package to packages folder
packages: !include_dir_named includes/conf

like this

update_notifications:

  sensor:
    # Sensor to track available updates for supervisor & addons
    - platform: command_line

I have an error:

Package supervisor_updates setup failed. Component update_notifications Integration ‘update_notifications’ not found.

Thanks for your effort and great package in the first post.
Just wanted to ask if you did finish creating the new package in the meantime?

Hi @CentralCommand,
great work! May I suggest that you add a hint in your initial posting that meanwhile Supervisor provides out-of-the-box entities for versions, newest versions, and updates available that only need to be turned on? I understand that your method creates less entities with more attributes and thus has advantages. But for some users the Supervisor entities will be the low hanging fruit that is extremely easy to reach and use. You would spare them to read through about 250 postings to discover that meanwhile there is an alternative method.

2 Likes

Just posted it. As noted in the details its unfortunately not just import and go anymore since there’s manual “enable the sensors” steps. But does involve a lot less curling supervisor. Let me know if you have any issues.

3 Likes

Turning them on doesn’t give any notifications though? It just enables some sensors. The point of this post was to provide an easy to import package that then gives you notifications for updates to any of your stuff. And besides the original package still worked without issue even on latest builds.

I did update it to use the supervisor integration just now if you want to try that out. That being said as I did note there’s a cost in that the package isn’t quite as easy to use now. Previously the only manual step was to make sure you had a notify.me service defined (or else replace the notifier in the alerts with the notifier of your choice). Now you have to open up the UI and enable a lot of sensors too.

Would you like to change the new updated package between </>? 😉

Btw; great work!

1 Like

Sorry I’m not sure what the question is. Is that an error you’re seeing or are you asking me to update something in the post?

The code formatting in your first post is broken.

1 Like

:man_facepalming: Fixed. Thanks!

hey dude,
i have a question:
Would it be possible that I get with your updated notifications, when an update still the current version and the new version as a message? So be it HACS or Addon?

That would be mega

Loosely related - I seem to have lost all the default updater entities. Anyone else? Was there an update?

Those got deprecated. You probably would get a better response if you posted in the thread for the current release (and the answer is already in there).

From the Breaking Changes section of the release notes:

Updater

The Updater integration has been deprecated; other integrations have replaced all its functionality. It is no longer a part of default_config, and if you have the updater integration defined directly in your YAML configuration, please remove it.

  • For the binary_sensor.updater entity, you can set up the Version integration with the “Home Assistant Website” source to get the same functionality back.
  • The configuration options reporting and include_used_components for the updater: configuration entry was deprecated in 2021.4. If you still want to share that, please use the new Analytics integration.
2 Likes

Guys, there is something I don’t get it.

Ok, cool, now I get notifications for audio, multicast, cli, dns, etc.

But how do I freaking update them? Am I missing something?

So audio, DNS, cli, and the other plugins all auto update. Those were added to the package a long time ago when there were auto update issues (around here specifically). That’s pretty much the only time you’d get a notification about those, when they auto update normally they are usually too fast for the alert to catch them in an out-of-date state. At least that’s been my experience, I haven’t seen a notification about any of them for a long time. That’s why I suggested watching their respective repos in the latest update to the top post instead if you want to know what’s changing with those.

For the addons, host and core update notifications you update them by going to the configuration panel in the UI. I believe the node red package includes an update action on the notification for each update so you can skip the UI but I never translated that to an HA automation. I might someday, I have been migrating my automation from node red to HA recently.

For HACS updates you have to go to the HACS panel to do the updates. There’s no option there, there is no service to update a HACS component by ID. There might be a websocket message but I haven’t invested the time to figure it out. And even if I did that would only work from node red anyway, HA automations don’t have a way to send a message to the websockets API.

I had figured out for everything except these minor components, like audio, dns, multicast, etc. Thanks a lot for explaining it. :slight_smile:

1 Like