Homeassistant automatic update

Nico Writing by Nico
  5 min of reading

This page has been visited ... times

Homeassistant automatic update

Here is a very interesting Blueprint, it allows you to automate all kinds of Homeassistant updates (Homeassistant kernel and system, Hacs, Add-ons, cards, etc…), easily creating a complete automation based on entry planning and the first day of launch. All kinds of options detailed below allow you to configure what you want to update.

Prerequisites

  • Home Assistant installed minimum version 2022.09
  • know how Blueprints work
  • HACS installed (optional)

Home Assistant Auto Update

For any questions or suggestions, use this thread on the Home Assistant Community Portal.

Homeassistant Blueprint

Facility

Nothing could be simpler: click on the import blueprint image above then on open link. Then you will find in settings > automations and scenes > Blueprint, a Blueprint named Home Assistant Auto-update on a schedule base before creating an automation I advise you first to create a schedule see the schedule step below, then launch yourself with the automation and in planning choose the entity created previously.

Blueprint feature

  1. Hacs update (depending on parameter)
  2. Create a full backup before running updates
  3. Force the Home Assistant host to restart if an update requires it
  4. Schedule updates
  5. Choose a day of the month for updates
  6. Update mode for Home Assistant kernel and OS updates
  7. Device firmware update mode
  8. Update mode for general updates
  9. (optional) Exclusions
  10. (optional) Pre-Update Actions
  11. (optional) Pre-reboot actions
  12. (optional) Post-Update Actions
  13. (Optional) Pause feature editing

HACS updates NOT included. This may work if you enable experimental features on your HACS integration or when the HACS update feature is released.

Create a full backup before running updates: I strongly advise to activate it..

backup before update ha

Force the Home Assistant host to reboot if an update requires it: This will not affect updates where a reboot is automatic, but for updates that require a manual reboot (quite common on HACS), this plan can automatically force a reboot when updates are complete.

reboot update ha

Schedule updates

planning to launch update automation in homeassistant

More info on the Scheduling option

Aller dans Paramètres > Appareils et services > Entrées > Créer une entrée > Planification

Planification d'une tâche dans homeassistant

Choose a day of the month for updates

Usually, a new major version of Home Assistant is released at the beginning of each month. Some people consider these releases not stable enough and prefer to avoid these releases, only updating the system in the middle of the month (day 15).

If you select a day greater than 28, updates will not run every month.

first day of the month of launching update automation in homeassistant

Update mode for Home Assistant kernel and OS updates

Selects the update mode for Home Assistant kernel and Home Assistant OS updates.

option of system and kernel updates in homeassistant

Device firmware update mode

Selects firmware update mode in devices connected to Home Assistant (when supported as HA update).

firmware updates option in homeassistant

Update mode for general updates

Doesn’t seem to work yet!

Selects the update mode for anything other than device firmware or a core component of Home Assistant. This includes add-ons, HACS components, custom cards, etc.

general updates option in homeassistant

(optional) Exclusions

Select items that should NOT be included in automatic updates.

Use this if you want to keep certain add-ons on a specific version and avoid automatic updates.

update exclusions option in homeassistant

(optional) Pre-Update Actions

Actions to perform before starting backup or any update. You can use it to send notifications, turn devices on/off or activate scenes before starting updates.

Note that all actions will be executed just before the update process, which can happen overnight. Take this into account when selecting your stocks. Note => The “” variable is available for your actions and contains the list of pending updates.

(optional) Pre-Reboot Actions

Actions to perform before the automation requests a restart. You can use it to send notifications, turn devices on/off, or stop automations before restarting Home Assistant.

Note that all actions will be executed just before the reboot process, which can happen overnight. Take this into account when selecting your stocks. Note => Note that all restarts will be controlled by this automation, such as when a Core update is installed. These actions may not be executed in these cases. Note => The “” variable is available for your actions and contains the list of pending updates.

(optional) Post-Update Actions

Actions to perform AFTER the update process is complete. You can use it to send notifications, turn devices on/off, or activate scenes after applying updates.

Note that all actions will be executed right after the update process, which can happen overnight. Take this into account when selecting your stocks. Note => The “” variable is available for your actions and contains the list of pending updates. IMPORTANT => Some updates will automatically restart Home Assistant, causing the automation to stop before completion, preventing post-update actions from being performed. If you have critical actions to perform after an update, consider including them in another Home Assistant startup-based automation as well.

(Optional) Pause feature editing

You can select one or more entities to pause updates. If one of the selected entities is “On” or “True”, the system will not update at the scheduled time. You can use it to keep your updates when you have a house party or when you are on vacation and don’t want to worry about updates on Home Assistant.

suspend entities from updates in homeassistant
Homeassistant Blueprint

Conclusion

I wanted to thank EdwardTFN Edward Firmo, for sharing with the HA community this magnificent Blueprint which is in my opinion a must to install. 👍

Nico

Nico

Founding member of the Haade site, a home automation enthusiast with all the tricks that go well.

Comments