Scheduled auto-update for Home Assistant

Same thing happend. At 03.00 the automation triggered and run. It does not update anything and the “update_list” is empty, only consists of “[]”.

Maybe I have a in-between version where you have removed some conditions for testing purpose. If I look in the blueprint for the part sending the mail, it looks like below, and will always run.

   - alias: "Run post-update actions"
    continue_on_error: true 
    choose:
    - conditions:
        - '{{ true }}'
      sequence: !input actions_pos_update
    default: []

Also see above comment on running.

I just change to “all” and changed the schedule to now. The automation was running as expected, updating to 2023.1.1. No problems at all.

I changed the schedule again to trigger the above situation, and the automation did not fire.

The problem I have experienced earlier is in this specific scenario.
Automation is set to “patch” and there is a “major/minor” update waiting. If this is the case, then the automation fires, do NOT update (as expected), however still send the notification mails. So, this problem is only relaed to the notification part (pre and post actions), not the actual update.

It was triggered by some update on the Home Assistant core, probably v2023.1.1, which was a patch and was release almost at that time,

Aha!
I will take a look at that.

If there’s nothing to update it shouldn’t get to this point… I will take a look.

So, I believe most of the bugs have been fixed and then I just made the latest version available to everyone on GitHub:

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Please feel free to contribute with your ideas for improvement directly on GitHub:

1 Like

Just a short update. I have been running this for 5 days now, with successfully updating 2 x core and 2 x add-on. No issues at all:-)

1 Like

Thanks for the feedback!!

Today I used it for the first time. Updating seems to work fine, but I’d like to receive a notification as well with the updates that are being installed. I use the ‘Pending_updates’ variable that should be available, but it doesn’t show in the notification (I just see the title):

service: notify.pushbullet
data:
  message: "{{ pending_updates }}"
  title: HA updates are being installed

Am I missing something? I trigger the nofication in the ‘Pre-update actions’.

It was changed to “updates_list” at some point. Not sure when.

@EdwardTFN, the blueprint still describe the “pending_updates” and not the “updates_list”.

1 Like

I think it was updates_list from the beginning, and for some reason I used something else on the documentation.
I’m sorry about that.

This is how I use that for myself:

service: notify.signal_edward
continue_on_error: true
data:
  message: |-
    List of updates: - {{ updates_list | join(' 

    - ') }}

Later today I will fix the instructions and update the Blueprint.

1 Like

A day late, but it’s done!

So, I’ve added support for selecting between “All”, “Patches only” or “Don’t update” for Core items, devices firmware and everything else, so now you can select exactly what you want to update.

Please let me know if you have any issues.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

The code is at the same place on Github:

Nice on the devices possibility. Have a lot of zigbee bulbs which gets updates.

Have installed and will get back if any issues.

1 Like

Hi,

Nice blueprint !
I’ve got some strange things. The blueprint update Unifi Network addon but I disabled update addons in the automation. Why ?

Also, possible to choose to backup only Core and not all addons etc ? It take more spaces in my VM, so it’s not powerfull to use.

Could you please share the entries in your Logbook related to this automation?

This is possible today, if you select to update only core items…

Update HA déclenché par l'événement 'automation_reloaded'
11:56:22 - Il y a 2 heures
Auto-update Variables: input_backup_bool: False, input_restart_bool: False, input_schedule_monthday: 1, input_update_exclusions: ['update.nas_dsm_update'], input_core_os_update_mode: all, input_firmware_update_mode: ignore, updates_list: ['update.home_assistant_core_update', 'update.inter_echo_show', 'update.unifi_network_application_update'] déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:25 - Il y a 2 heures
Auto-update A new update is available for Home Assistant. déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:25 - Il y a 2 heures
Auto-update List of updates: - Home Assistant Core Update - Inter echo show - UniFi Network Application Update déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:25 - Il y a 2 heures
Auto-update Running pre-update actions... déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:25 - Il y a 2 heures
Auto-update Starting sequence of standard updates... déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:25 - Il y a 2 heures
Auto-update Updating UniFi Network Application Update of ['update.unifi_network_application_update'] ... déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:25 - Il y a 2 heures
Auto-update Starting sequence of core items updates... déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'
11:56:51 - Il y a 2 heures
Auto-update Updating Home Assistant Core Update of ['update.home_assistant_core_update'] ... déclenché par l'automatisation Update HA déclenché par l'événement 'automation_reloaded'

Same problem, I’ve set just core-items but found in Backup tab that the automation backup also all addons.