Scheduled auto-update for Home Assistant

I see that. I will have to review the code and maybe add a bit more log.
I come back soon.

I’ve added more logs and removed a session where the blueprint was catching up the remaining updates (as this probably doesn’t make sense anymore with the new filters).
Could you please load the latest blueprint and try again and, if you still seen the same issues, could you please share your Logbook again?

Implemented without any errors. Will report if anything is strange.

1 Like

Thank’s a lot! Seems to work :slight_smile:
Last update 2023.3.3 updated without update anothers addons.
To be sure, If I check full-backup, If I only want to auto-update core, the automation only backup the core container ?

Have a nice day!

1 Like

No. It always do a full backup.
I will take a look later if I can improve that…

I think it’s possible. Each update service can make a backup. I don’t know how the blueprint work but get all entity and call separately with variable which call backup or not defined by the user.

It’s not that simple…

  1. A firmware update of a remote device would not require a backup of any component in Home Assistant, but would have any case where a firmware represent some component capable to affect Home Assistant (and then a backup should be considered)?
  2. If you are using experimental features in HACS, everything there will generate an update entity. How to define what should be backed up for each component (a custom integration, or a card, or a theme, etc)? Most of the time I don’t have anything other than the update entity itself.
  3. What to backup for each of the core items?
    3.1. Home Assistant Core
    3.2. Home Assistant Supervisor (which is most of the times updated automatically before this automation detects it is available and probably before any backup is done)
    3.3. Home Assistant OS

This might have been asked before, but is it possible to add an option to skip x versions of a new major realease?

Like if I want to skip 2023.1.1 - 2023.1.3 and start at 2023.4 as the first couple usually contains some 0 days updates

I will take a look at that…

But anyways, if you are trying to avoid the first few updates of Home Assistant each month, you can set the blueprint to not update until day X in a month, and if you use like day 21, you will be playing quite a lot in the safe side.

is it with this blueprint possible to update esp-devices automatic?
Have set the blueprint, I think correct but nothink is up to date.

Yes, it updates the ESPHome devices.

hmmmdon’t know whats wrong but after the update I get this in my log:

Auto-update Remaining updates: - Home Assistant Core Update - ESPHome Update - Samba share Update - Studio Code Server Update - Z-Wave JS UI Update - serverschrank-luefter Firmware - heizung-keller Firmware - Fußbodenheizung Verteiler Firmware - haust Firmware - Bluetooth Proxy Firmware - bad-lufter Firmware ausgelöst durch Automatisierung Auto Update ausgelöst durch Zustand von Auto Update

solved the Problem.
If the sheduler is to short the automation can’t finish all updates

1 Like

I get now this error:

Error: AwesomeVersionCompareException: Not a valid AwesomeVersion object

What does this mean?

When comparing versions some of your update entities provided a version number which is not compatible with the command to compare versions on Home Assistant.
Anyways, this shouldn’t break the automation. Do you have any other entry in the logs or perhaps something on Logbook to help finding where in the automation it was crashing?

in the trace I see every day this error. In the logbooks there is nothing, only automation trigger.
This must breake the automation, because there is no app which update over the night.

The automation run a few days without problems.

Is there a way to update the “Home Assistant Operating System” using this blueprint?

I tried several times (scheduled during the night and also manually), but it looks like the OS upgrade is skipped:

Remaining updates: - Home Assistant Operating System Update triggered by automation triggered

The “Update mode for Home Assistant core and OS updates” is set to “All”

Thanks!

It should be updating the OS… And based on your log, it’s at least calling that update. This will be hard to reproduce for a troubleshooting. :frowning:

From which version and to which version are you trying to update?
The blueprint uses the service update.install. Have you tried update this entity using this service call? Any error?

Thanks @EdwardTFN - I’m able to reproduce issues with an HA VM. The blueprint was installed on this system:

Home Assistant 2022.10.5
Supervisor 2023.09.2
Operating System 9.3
Frontend 20221010.0 - latest

The blueprint/automation has upgraded the add-ons and core to 2023.9.3, except the OS, which remained at 9.3.
I have used a simple script to test the update.install feature, which worked and the OS was upgraded to 9.5:

service: update.install
data: {}
target:
  entity_id: update.home_assistant_operating_system_update

The OS upgrade seems to happen in steps, so there is another upgrade to 10.5 outstanding, which the blueprint does not install as reported.
Please let me know if there is any debug information needed for troubleshooting the blueprint.
Thanks.

Hi @EdwardTFN

I have a couple of machines where I use your excellent blueprint.

On two of them (one physical and one VM) the update is not completing though.
It runs alright every night - but for some reason does not come through the condition check.

It’s as if it see the schedule to be off, even though it’s actually, since it triggerede the automation to run.

I’ve tried to redownload the blueprint to see if there was updates solving the issue.

I have other instances of Home Assistant where the blueprint is running just fine.

Any suggestion on how to troubleshoot this?