I am using the ESPHome Dashboard Add-on in Home Assistant and have several ESP devices with varying hardware specs configured with ESPHome.
This is all working very well, but I don’t fully understand the ESPHome update mechanism yet.
Every time there is an update for the ESPHome Add-on in Home Assistant all these devices are marked with “Update available” in the ESPHome Dashboard.
When reading through the release notes I can imagine that sometimes an update is only valid for a sub-set of the ESP devices, like for instance only for ESP32 versions or only for versions supporting Bluetooth.
So I wonder if it is checked by ESPHome whether an update is valid only for specific devices?
Or are the updates always pushed to all ESP devices?
If so, this would mean that sometimes an ESP device is “updated” while there are no real changes at all?
A related question is: when an ESP device is not online while I install an ESPHome update by pushing it to all devices, using the “Update all” option, this device of course is not updated at that time.
But it looks like the “Update required” indication for that device in the ESPHome Dashboard dis-appears at that time anyhow.
Is this due to a validity check not being in place for the individual devices?
And what is the correct way to install the update later when this device comes online again: is it enough to just do a re-install with the existing (unchanged) yaml configuration for the device via the ESPHome Dashboard?
The “Update flag” is set based on the ESPHome-version tag in the .esphome/<device_name>.yaml.json file and the current ESPHome version of the AddOn. This json file is generated by every new “Compile/Install/Update” as part of the C++ code generation action. So even when you stop the “Update” action just after the “compiling of…” message you will see that the “update flag” disappears. There is no “functional” check at all. You have to check the release notes to judge if an update is really needed or not. Never used the “update all” myself, if a device is working fine and no updates in ESPHome for the used components why update. And if there is a security update of updates in the core first check with a less important device before updating all
Thanks Jos, that’s clear now.
Still, it would be much better if there was a more fine-grained validity check mechanism. There already is a good version control (through Github and alike) for all external components used by ESPHome and Home Assistant, so shouldn’t it be possible to use that info to automatically determine whether an update is valid for a specific ESPHome device set-up?
The problem with self-judging whether an update is applicable is that the release notes and descriptions on the Github pages often are not very clear.
As an example the current update ESPHome Release 2022.12.2
This are the release notes:
Release 2022.12.2 - December 20
Fix import_full_config for adoption configs esphome#4197 by @jesserockz
Handle zero padding anywhere in the combined adv data esphome#4208 by @bdraco
The second fix appears to be related to the Bluetooth proxy so should at least be installed on all ESP32 devices with Bluetooth enabled and in use.
But I cannot make chocolate from the first fix: this is a very unclear description and the Github page does not bring any more insight. Should I go through the commits and try to understand what this is all about? That’s way above my capabilities.
So in the end I often (most of the times) just decide to do an “Update all”, just to be sure.