WTH Summary: WTH do I have to restart Home Assistant (and connected networks like Z-wave, Zigbee, and Thread) multiple times in order to bring everything up to date when there are updates available for Home Assistant, HaOS, Add-ons, and on VMs, the host system/hypervisor.
Feature Request–Allow updates to be installed/staged but defer the activation of those updates until the user is ready to reboot (or restart the necessary components).
This is really 3 related feature requests in one:
- Feature Request 1: Ability to update Home Assistant without an immediate restart.
- Feature Request 2: Ability to update Add-on containers without an immediate restart of the add-on.
- Feature Request 3: Ability to update HaOS without an immediate reboot.
Benefits–This will allow users to reduce the amount of downtime and restarts during periodic system maintenance. Additionally, a number of questions about the order of applying updates and whether there any dependencies between components that need one component updated before another can be reduced or eliminated by only restarting after all the desired components have been updated.
Use case 1
- Install/stage updates for Home Assistant and any desired add-on updates without restarting.
- Install HaOS update and allow the HaOS update to reboot with the result that everything is restarted with the newly installed versions.
This process would likely be used when HaOS is installed on physical hardware or there is no maintenance that needs to be done on the physical host system.
Use case 2
Similar to above but allow for maintenance that needs to occur on a physical host system without additional restarts:
- Install/stage updates for Home Assistant and any desired add-on updates without restarting.
- Install/stage HaOS update but do not restart
- Shutdown HaOS
- On the host (physical) system apply updates to the OS, kernel, hypervisor, storage, etc.
- Reboot the host physical system, so that everything will start up fresh with the newly installed updates.
Motivation–While some users may actively apply any update as soon as it is available, other users may prefer to only update their Home Assistant installation a regular schedule such a monthly cadence in the belief that it will reduce downtime and increase stability.
Motivation for use case 2–According to Home Assistant analytics, VM installations of Home Assistant are one of the largest groups. As mentioned in the 2024.2 release party, VM installs (32.6%) passed RPI 4 installs (32.56%). So there is additional incentive to make sure there isn’t too much downtime while trying to update the full stack.
I understand there are risks with updating too many things at once and then not being able to tell what caused things to break, but if I’m aware of the risks and want to take them that should be up to me. Also note, this a similar case to a user reinstalling Home Assistant from a backup.
If this is considered an advanced feature, I’d be happy to just have access from the CLI and envision something like this:
# ssh hassvm
$ ha core update --no-restart
$ ha os update --no-restart
$ ha addon update foo --no-restart
$ ha addon update bar --no-restart
$ ha host shutdown
# # ----- back on physical host after the ssh has exited ----
# apt full-upgrade # do host system/hypervisor updates,
# reboot # host system