A Home Assistant blueprint to assist keeping the system automatically updated with the latest version of it's multiple components.
I’ve created a new version of my previous Auto-update Home Assistant blueprint , but now based in the new schedule helpers and other improvements. I’m using this blueprint myself.
I understand Home Assistant wasn't considered a stable system for years,
I still think you should understand the benefits and risks of auto-updating, so I keep suggesting you to take a look on those discussions:
Please provide feedback. This is based on my other blueprint, just changing the items related to the schedule, so I believe the update mechanism itself is quite well tested, but you know, there are always new ideas or new use cases that we never though about, so let me know your ideas, issues and concerns… :relaxed:
The update of HA Supervisor is always set to auto-update by the system, so it will be updated out of this blueprint anyways (and the time of that update is not controlled by this blueprint). Please take a look into the following discussions around this:
All the standard add-ons of Home Assistant supports to set “Auto-update” thru the UI. If that is enabled, this blueprint cannot guarantee the time of running the updates for that specific add-on (as it is controlled outside this blueprint).
At this moment (2022-09-10), HACS updates are not released, but it is an experimental feature, so, if you enable HACS to use its experimental features, this blueprint will include HACS updates automatically.
You will need a schedule helper indicating the time slots where the updates could start.
The updates will be installed one by one, while inside the schedule windows. It’s not guaranteed that the update will finish inside the schedule windows. If one of the updates forces HA to reboot, the automation will restart after the reboot and will resume the updates of all the remaining items while in the schedule windows.
Just click in the following button and follow it's steps:
Open Home Assistant interface
Using the File editor (or Studio Code Server), navigate to the /config/blueprints/automation
, right click and then click on New Folder...:
Type a name for your new folder
Right click your new created folder and select New file..., then name your file (make sure to end with .yaml
).
Go to the edit window and past the content of this blueprint.
Go to Developer tools and select the tab YAML.
Click on Automations and wait until it is reloaded.
The following inputs are supported by this blueprint:
Select it if you want to trigger an additional backup before starting the updates.
This won't affect updates where a restart is automatic, but for updates requiring a manual restart (quite common on HACS) this blueprint can automatically force a restart by the end of the updates.
You can create an Schedule under Settings > Devices & Services > Helpers.
Usually a new major version of Home Assistant is available on the begining of every month. Some people consider those release as not stable enough and prefer to avoid those versions, not updating the system until the mid of the month (day 15).
If you select a day higher than 28 the updates won't run every month.
Select the items that should NOT be included on the automated updates.
Actions to execute before the backup or any update starts. You can use this to send notifications, turn on/off devices or activate scenes before starting the updates.
{{ pending_updates }}
is available for your automations and contains the list of pending updates.Actions to execute AFTER the update process finishes. You can use this to send notifications, turn on/off devices or activate scenes after applying the updates.
{{ pending_updates }}
is available for your automations and contains the list of pending updates.You can select one or more entities to pause the updates. If any of the selected entities is "On" or "True" the system won't be updated on the schedule time. You can use this to hold your updates when you have a party at home, or when you are on vacations and don't want to be concerned about updates on Home Assistant.
Please take a look on the log of commits.