It would be great to have the option to schedule an update to a device etc at a convenient time. So have a button beside the skip and install buttons.
This would be extremely advantagious for updating things that could cause some kind of downtime and could be scheduled for the middle of the night.
There is an install update service. You could achieve this by scheduling an automation that calls the service to run whenever you want the update installed. Not as simple as what you are asking for but figured it might be useful to mention in case you didn’t know.
2 Likes
Good idea. The annoying thing is there is no way to tell it to install all updates. Each has to be added individually. I put the big three in.
Here is my test automation using your idea. I’m leaving the automation turned off in my system then I can turn the automation on after the next update is available assuming I approve that update. Then 4am the next morning it will back itself up and perform the update. Finally it should turn the automation off again. I’m not really sure if the last part will work or the update will stop the automation before it turns itself off. The idea is the automation will always be off till I approve an update. This is basically how I would like to scheduling updates if the HA team implements it.
alias: Install updates at 4 am
description: ""
trigger:
- platform: time
at: "04:00:00"
condition: []
action:
- service: update.install
data:
backup: true
target:
entity_id:
- update.home_assistant_core_update
- update.home_assistant_operating_system_update
- update.home_assistant_supervisor_update
- service: homeassistant.turn_off
data: {}
target:
entity_id: automation.install_updates_at_4_am
mode: single
1 Like
I think you may run into a problem with this. I believe automations stop if they encounter an error and you are likely to get an error if you try to run the update service on a component that doesn’t have an update. If you want one automation to install any updates you will probably need to put a condition to check each component to see if there is an update and then conditionally call the update service for that compont if there is one.
1 Like
Only one of those 3 update entities supports taking a backup of it prior to install. So I’m pretty sure your service call is just going to fail every time. Maybe it will update core first before failing but the other two won’t work.
Also supervisor auto-updates by default. So not sure why that is in the “big 3”. You don’t have to schedule anything for that one.
Finally I’m pretty sure a nice user has already done all the work for you with this blueprint:
I don’t think you need to do anything else. Already supports scheduling and updates way more things then just the “big 3”.
2 Likes
That’s the way it is sometimes. I have or I hear a great idea and get so excited to give it a try I don’t stop to see if someone else solved it. It looks like they even included the toggle I wanted to disable backups. A couple very small additions and it’s almost everything I would want.
I still strongly support the overall topic though because scheduling should ideally be part of the update process.
EDIT: Combined with the recommended update notification feature I can have HA send me an actionable link to schedule the update. This could be an amazing setup.
1 Like