Do you want get alerts or notifications Home Assistant has an update? What about getting alerts when an HACS integration has an update?

In this guide, I’ll show you exactly how to do that. If getting update notifications and alerts isn’t your thing, I will also show you how to put that information into a Lovelace card, so at a quick glance you’ll see exactly how what needs updating and how many total integrations you have installed.

Let’s get started!


Step 1: Enable Version in Configuration.yaml

First, you need to add this to your existing sensor section in configuration.yaml if you haven’t already. (I believe this is installed by default already, but if not – I’m including it below.) This will allow you to see which version is currently installed.

- platform: version

If you don’t already have a sensors section added, you will add:

sensor:
  - platform: version

Home Assistant Update Notifications

We are going to take the shortcut here using Home Assistant Blueprints. If you haven’t used blueprints before, they are a super easy way to setup the automation for creating a Home Assistant update. Rather than having to manually copy/paste yaml, you can just import the existing blueprint and change a few values from the UI.


Part 1: Import Blueprint for Home Assistant Update Notifications

First, navigate here: https://community.home-assistant.io/t/home-assistant-update-notification/256094 and then click Import Blueprint.

If you haven’t imported a blueprint before, just add your Home Assistant IP address or URL to authenticate and continue through the prompts. You should only have to do this the very first time you import a blueprint.

If you’ve imported some before, just click Open Link.

Click Preview Blueprint.

Then click Import Blueprint again.

Once imported, click Create Automation.

Part 2: Create Automation

A new Blueprint page will pop up. Most of the info is filled out for you already, but you’ll need to change the update sensor to binary_sensor.updater and then choose the device you want the notifications to go to.

Once complete, click Save. Then, click Run Actions to confirm it works correctly.

If you are an Android user and want a more fancy notification, import this blueprint instead: https://community.home-assistant.io/t/fancy-home-assistant-update-available-notifier-for-android-with-customizable-notification-settings/293469 This blueprint will let you change the notification color, include a link to the release notes, and optionally link to the HassPodcast. I changed mine to purple:


HACS Notifications

To get persistent notifications within Home Assistant (from the “Notifications” section instead of mobile), you can simply copy and paste this code into your configuration.yaml file. No changes are needed.

I pulled these straight from the HACS website.

New HACS Repositories Added

For this new repository in HACS to work, you have to add a new repository by clicking the 3 dots in the top right corner and clicking Custom Repositories. It will not notify you if you simply download an integration from the list of integrations already present in HACS.

automation hacs_new_repo:
  - alias: Create a notification when something is added to HACS
    trigger:
      platform: event
      event_type: hacs/repository
      event_data:
        action: registration
    condition:
      condition: template
      value_template: "{{ trigger.event.data.repository is defined }}"
    action:
      service: persistent_notification.create
      data_template:
        title: New repository in HACS
        notification_id: hacs-new-repo
        message: >-
          {% set repo = trigger.event.data.repository %}
          {% set id = trigger.event.data.repository_id %}
          [{{ repo }}](/hacs/repository/{{ id }})
          was just added to HACS.

HACS Updates Available

automation hacs_updates:
  - alias: Create a notification when there is updates pending in HACS
    trigger:
      platform: state
      entity_id: sensor.hacs
    condition:
      - condition: template
        value_template: "{{ states(trigger.entity_id) != 'unknown'}}"
      - condition: template
        value_template: "{{ (states(trigger.entity_id) | float) != 0}}"
    action:
      service: persistent_notification.create
      data_template:
        title: Updates pending in HACS
        notification_id: hacs-update
        message: >-
          {% for repo in state_attr(trigger.entity_id, 'repositories') %}
            **{{ repo.display_name }}** _{{ repo["installed_version"] }}_ -> _{{ repo["available_version"] }}_
          {% endfor %}

My Favorite Home Assistant Devices

Below are some of the Home Assistant-compatible devices I personally use in my home. I highly recommend each of them.

The full list of all Home Assistant compatible & recommended devices I use can be found on my Equipment List page.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *