Homeassistant automatic update
This page has been visited ... times
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.
- 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.
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.
- Hacs update (depending on parameter)
- Create a full backup before running updates
- Force the Home Assistant host to restart if an update requires it
- Schedule updates
- Choose a day of the month for updates
- Update mode for Home Assistant kernel and OS updates
- Device firmware update mode
- Update mode for general updates
- (optional) Exclusions
- (optional) Pre-Update Actions
- (optional) Pre-reboot actions
- (optional) Post-Update Actions
- (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..
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.
Aller dans Paramètres > Appareils et services > Entrées > Créer une entrée > Planification
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.
Update mode for Home Assistant kernel and OS updates
Selects the update mode for Home Assistant kernel and Home Assistant OS updates.
Device firmware update mode
Selects firmware update mode in devices connected to Home Assistant (when supported as HA update).
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.
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.
(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.
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. 👍