Auto-update Home Assistant

Hi @SilverLeaf, my apologies for my delay in a response.

Could you please give me one more information from Developers tools > States?
I wanna know if you have the entity sensor.backup_state and it’s attributes.

Hi, I don’t have this sensor.

Aha!
I believe this sensor is only available when Google Drive Backup add-on is running, and I was using this in the automation to skip a new backup if another backup was done in the past 2 hours.

Now I know why this isn’t working for you (and probably for other people also).

I will come up if a fix soon.

Yes, I don’t use Google Drive Backup.

Just to confirm. As SilverLeaf I do NOT have the entity. I use Samba backup.

1 Like

Ok. I will take that in account. Hopefully I will have a workaround (backing up regardless if another backup was done recently) later today.

Done!
Took me some time to test as I’ve waited for the new backup, but everything is looking good.

I’ve updated the blueprint in the first post.
Please give me your thoughts.

And I’ve just applied another fix related to the Last Backup sensor.

Tonight HA has been updated, Full BackUp is available!

1 Like

So, I’ve created a new blueprint, this one to use the new schedule helper.
Please take a look here: Scheduled auto-update for Home Assistant - Blueprints Exchange - Home Assistant Community (home-assistant.io)

  • I haven’t changed this one to not mess up with existing implementations, so if you want to use that new one, create a new automation based on that one and remove your previous automation based on the old blueprint.

May I ask a favor to you guys using Samba Backup?

Could you please take a look at the sensor sensor.samba_backup and let me know exactly how is the format of name and for the value of the attribute last backup?
You can see this under Developer Tools, selecting tab States and then typing the sensor name at the search field. (Please make sure Attributes is selected, so you can see the attributes)

I don’t have Samba backup, so I need your help to make sure I’m doing right on the part where the automation should wait for the backup to complete before start the updates.

Hi, good job and thanks for your effort.
Is it possible to add this feature?

  • Don’t update major versions that releases beginning of every month.
  • After major update installed manually, install minor updates automatically.

Thanks

You can use the “first day of the month” input to prevent running it on the beginning at the month. It’s not the same you are asking for, but it might help for now.

I will take a look on how to prevent major releases (selectable via another input) and come back.

By the way, I would suggest you to use this newer Blueprint instead: Scheduled auto-update for Home Assistant as this one is based on Schedule helper (which provides more flexibility to run the updates in the right time windows, and not only a time to trigger per day).

Hi Edward, The samba sensor have these attributed.

friendly_name: Samba Backup
backups_local: 2
backups_remote: 32
total_backups_succeeded: 22
total_backups_failed: 0
last_backup: 2022-09-28 02:15

A screenshot looks like this

1 Like

Thanks!!
I can work with this now.

It is interesting… No timezone info on the last backup timestamp…
Do you know if this is UTC or local time? I mean, do you run your backup at around 02:00AM local time?

The time is local system time. I start the backup at 02.00 local time.

1 Like

I have worked in a separated blueprint to skip the major updates, but it was doing string comparison, which is far from ideal.
Now looks like the version 2022.10 will have a version filter, which hopefully will make this much more reliable, so soon I will be able to test it.

Just wanted to say thank you for this blueprint.
For people that are aware of the risks of auto-updating and still want to do it, this is great!
I like the overall day-of-the-month delay, but I would be interested in an option where you can set a kind of “per-update delay” (and I may not be the first the ask this of course)?

1 Like

Let me try to understand your idea…
Let’s say v2023.x.0 is released in day 1 and I have a 3 days delay set, so that won’t be installed until day 4, right?
But then, at day 3 it was released v2023.x.1…

  1. Should v2023.x.0 still be installed on day 4?
  2. Should v2023.x.0 be skipped and then v2023.x.1 be installed at day 6?

I think option 1 might leave you with some critical bug or security risk for what a fix is available. While option 2 might keep you in an even older version for a long time of new fixes comes regularly.

Any other idea?