Constant updates, skip option

Well, you complained about useless updates impacting the longevity of your device.

@seanomat Not me. Wearing out an SD card or the flash ram on a device is rare. If you are replying to someone else, tag them in your post.

I think the convenience of managing all updates in one place inside home Assistant and being able to automate over them outweighs many of the minor inconveniences.

Install all updates:

Script:
  sys_update_all_install:
    sequence:
      - variables:
          updates: |
            {{ states.update | 
               selectattr('state', 'eq', 'on') | 
               selectattr('attributes.in_progress','eq', false) | 
               selectattr('attributes.latest_version','ne','attributes.skipped_version') | 
               map(attribute='entity_id') |
               list }}
      - service: update.install
        data:
          entity_id: "{{ updates }}"

If you are in inconvenienced about the notifications you can, as mentioned in this thread before, just disable the appropriate entities.

Or, thanks to the update-integration, you can now easily skip all esphome updates with one click:

script:
   sys_update_esphome_skip:
    sequence:
      - variables:
          updates: |
            {{ states.update | 
               selectattr('state', 'eq', 'on') | 
               selectattr('attributes.title','eq', 'ESPHome') | 
               selectattr('attributes.in_progress','eq', false) | 
               selectattr('attributes.latest_version','ne','attributes.skipped_version') | 
               map(attribute='entity_id') |
               list }}
      - service: update.skip
        data:
          entity_id: "{{ updates }}"

We can all be happy :smiley:

EDIT (20230527) Here is the revised script that can manage all updates for an integration:

script:
  sys_update:
    sequence:
      - variables:  
          updates: |
            {% set updates = expand(integration_entities(integration) | select('match','update.')) %}
            {% if action == 'clear_skipped' %}
              {% set updates = updates | selectattr('attributes.skipped_version','ne',none) %}
            {% else %}
              {% set updates = updates | selectattr('state','eq','on') | selectattr('attributes.in_progress','eq',false)  %}
            {% endif %}
            {{ updates | map(attribute='entity_id') | list }}
      - service: "update.{{action}}"
        data:
          entity_id: "{{ updates }}"

You need to pass these two parameters to the script:

action: ā€˜installā€™, ā€˜skipā€™ or ā€˜clear_skippedā€™
integration: name of the integration, f.e.

  • ā€˜hassioā€™ (includes, OS, Core, Supervisor, all addOns)
  • ā€˜shellyā€™ (all shelly devices)
  • ā€˜esphomeā€™ (all esphome devices)
  • ā€˜fritzā€™ (all AVM devices, not tested)

You can find the name of the integration in itā€™s diagnostics:
settings > integrations > specific integration > ā€¦ overflow menu > download diagnostics > integration manifest > domain

This how you would call the script with a button, an automation or whatever:

          - service: script.sys_update
            data:
              action: "install"
              integration: "esphome"
6 Likes

Well @Protoncek did and that was who I was replying to.

Thatā€™s true, but it still doesnā€™t mean that it forces me to update.
But, you still didnā€™t tell how many esphome modules do you have? Zero? One? I doubt that thereā€™s moreā€¦

Itā€™s clearly shown that you donā€™t do with esphome much, do you? There can be tons of problems if iā€™d update my 30+ modules with one script. There are too many bugs too many times when a new esphome version comes out. Doing that many times at least some of my espā€™s would break often and iā€™d need manually to ā€œrepairā€ itā€¦ But, this update from HA doesnā€™t work for me anywayā€¦

Hi Pavel, I can understand if there is a new additional chip that is integrated in esphome that there is a esphome update for sure. But I do see no use in a constant one or twice a week update of my esp nodes, I can not see why there should be so many problems, to be fixed.
And speaking for myself, I feel like that my esp nodes do perform worse and worse over time, often dropping WiFi, more hick ups in functioning. Have the feeling that the basic esphome from some time ago performed better, that there is way too much code that is implemented in the flash of the nodes that make them run more and thus making them more cpu stressed.
To back this up, I still have a few nodes running ESPEasy, from 6 years ago, no updates and they run rounds around the now ESPHome which they did not do at the time I was thinking what to use ESPHome or ESPEasy, soā€¦ is all update a progress, and is it always needed?!

2 Likes

Until a breaking change hits you.

I used to turn on auto-updates in all of my add-ons until a breaking change cost me several hours of repair work.

2 Likes

THIS IS JUST A GUESS
There are likely many contributors in the ESPHome code maintenance and when one fixes an issue a new version is released.

Why does this not happen in Home Assistant? Could it be that in HA the between-release fixes are published in a beta channel and collectively released at the end of the month?

Not quite sure what youā€™re referring to here. Itā€™s exactly what happens in Home Assistant as well.

Home Assistant stable (non-beta) releases:

Release 2022.12.1 - December 8
Release 2022.12.2 - December 11
Release 2022.12.3 - December 11
Release 2022.12.4 - December 12
Release 2022.12.5 - December 13
Release 2022.12.6 - December 14
Release 2022.12.7 - December 17
Release 2022.12.8 - December 21
Release 2022.12.9 - January, 2
Release 2023.1.1 - January 5
Release 2023.1.2 - January 8
Release 2023.1.3 - January 10
Release 2023.1.4 - January 12
Release 2023.1.5 - January 17
Release 2023.1.6 - January 19
Release 2023.1.7 - January 22
Release 2023.2.1 - February 2
Release 2023.2.2 - February 4
Release 2023.2.3 - February 7
Release 2023.2.4 - February 13
Release 2023.2.5 - February 15

2 Likes

Yup. Itā€™s up to us users to choose our own update schedule. Iā€™ve chosen once a month, usually around the third week when things have calmed down a bit. I did my HA update this morning. Iā€™ve already updated ESPHome once this month, so I may wait until my next cycle for that. Or not, I sometimes have to fight the urge to get everything up to date.

Iā€™m in the same boat with other people on the update notifications though. For some people a visual notification like that creates a sense of urgency thatā€™s not really warranted or appreciated and they might have a harder time than others to tune out of that. Iā€™m definitely one of those people.

As such, I wish the update notification was more configurable.
The reason why the frequent Home Assistant updates donā€™t bother me as much is that itā€™s one update versus 25 individual ones every time.

2 Likes

Are others also getting a HA update notification every major/patch release, too?

I donā€™t get those either.

Am I just lucky or am I not getting any of these because Iā€™m not running a Supervised-type install?

I have ESP devices which require me to pull a panel from a cabinet, extract the ESP-12F from its relay board, plug it into my firmware burner and then write the update file to it. Iā€™m not doing that every time a ESPHome update is released. It runs multiple relays over a serial chip, that code isnā€™t changing much between releases. Most of my esphome devices do not need an update after they have been created, ever. So I think ESPhome devices should not be part of the update notifications in core. At least I would like to be able to turn update notifications of for all ESPhome devices.

so I am assuming with this new update 2023.3, there is no change to this topic? I just want to update the esphome update and not actually update all the esp devices.

What is keeping you ?

  • you can update the add-on whenever you want.
  • if you donā€™t want the update notifications, disable the update sensors, and you wonā€™t see them anymore, except on the esphome add-on page.
1 Like

if you donā€™t want the update notifications, disable the update sensors, and you wonā€™t see them anymore, except on the esphome add-on page

So if I disabled the update sensor and decide to update the firmware on the device will it revert back to enabled by default?

no, it will not turn on againā€¦

Google brought me here and I fully agree.
I have around 50 ESPHome nodes in my home and started to update all to ESPHome 2023.3.0 after an intrusive high orange number asked for it. This took me around 1,5 hours.

A couple of days later, the orange number reappeared, because there is an update to ESPHome 2023.3.1.
I took another 1,5 hours to update all my ESPHome devices.

Today the orange number reappeared because there is a new ESPHome update to 2023.3.2

I will skip this update because by now Iā€™m worried about the flash memory in my sockets.

Please set up an option to hide updates for ESPHome components. I will continue to cheerfully update the firmware in my unifi components every month or so, but not updating all my ESPHome devices like 4 times a month.

1 Like

see solution aboveā€¦

1 Like