ESPHome update notifications

As Tom says, each of my esphome integrations (devices) has an update entity

Did you configure this somewhere?
I run the latest version of ESPHome (2023.11.6) and none of my ESPHome-devices have such an entity:

No but it might be part of the add-on ?

That’s the main part: I am using the Core-version of Home Assistant and ESPHome and therefore, do not have add-ons and also no chance to access ESPHome directly from the Home Assistant web interface.

Yes I saw that, wasn’t sure it was because of that, but guess it must be the update entities are only when you use the addon. Are you using the Native API or MQTT ?

That seems highly unlikely. An addon is just extra software running on the same host. It is the ESPHome integration making the entities. But it is likely you’ll need to use the API and not MQTT, as they are different ways of exposing entities.

However, be careful what you wish for if you have many esp devices :wink:

Home Assistant connects via ESPHome Native API in my setup. Works amazing! :slight_smile:

To be honest, I am using the Native API but no update entities are offered for now. Which kind of Home Assistant setup are you using? The Home Assistant OS?

For now there are 9 ESPHome based devices (mainly ESP8266) - but increasing over the last days and months

Yes, using HAOS and the addon. I have disabled the update entities now as I have 81 devices and get update notifications almost every week for ever .1 release, for all 81 !

I just update all devices at the .0 release

Might be worth asking on the esphome discord ?

Just seen this on discord after a search:
1. ### taskmaster 12/04/2023 01:29
the new fw update entity is run by HA?
2. ### jesserockz 12/04/2023 01:29
Yes, its entirely in HA based on the addon version

EDIT: I think this is the addon update entity !

The update entities should be there from esphome 2023.2 provided your HA instance is also up to that level:

Could it be the entities are only made if you add new ones? Have you tried removing the device and adding them again to HA?

Edit: the above post mentions the addon version, so maybe I’m proven wrong in that respect.

The update check for esphome nodes doesn’t work without the esphome dashboard add-on installed.

By default the add-on communicates with HA and will tell the esphome version which then is checked against the esphome node versions.

I just disabled the communition between the esphome add-on and HA which stops all update notifications for my 60 esphome nodes with just one toggle switch.

Is it this toggle you turn off ? Does it affect anything else ?

Home Assistant Dashboard Integration
Enables/Disables the ESPHome dashboard integrating with Home Assistant for automatic configuration of devices and device updates. If you use multiple version of the ESPHome add-on, make sure it is enabled on a single add-on only.

Yes, exactly

No, nothing I’m aware of. All my esphome nodes continue to be rock solid and work like expected.

Nice, thanks. Does it affect the automatic discovery of new nodes ?

Not at all. The esphome add-on integration doesn’t affect the esphome integration at all.

Essentially this setting just tells the add-on to don’t tell HA what version of the add-on is installed which leads to no more update notifications for all esphome nodes.

This is NOT the esphome integration but a dedicated one for comes between add-on and HA which btw. Isn’t present for core/docker install and that’s why this post exists in the first place!

1 Like

Care to share exactly how you do that?

I asked the same, they mean this toggle in the addon:

Home Assistant Dashboard Integration
Enables/Disables the ESPHome dashboard integrating with Home Assistant for automatic configuration of devices and device updates. If you use multiple version of the ESPHome add-on, make sure it is enabled on a single add-on only.

Fixed a bug which caused unavailable devices to be marked as outdated:
{%- if 'version' in entity -%}
was replaced by
{%- if 'version' in entity and states(entity) != "unavailable" -%}
The code in the original post was updated accordingly :slight_smile:

Great work! However, I can’t get the esphome_version-sensor to work.
I’ve copied the command_line sensor to my config file, but it never gets a sensor state.

In the log I can se that the command is running:

2024-01-18 08:01:39.250 DEBUG (SyncWorker_6) [homeassistant.components.command_line] Running command: curl -s -X GET https://hub.docker.com/v2/namespaces/esphome/repositories/esphome/tags | jq -r '.results|.[]|.name' | egrep -i "^$(date +'%Y')\.[0-9]{1,2}\.[0-9]{1,2}$" | sort -rn | head -1

but it never seems to get a get a reply and the esphome_sensor never gets a value.

Do you have any clue what the problem might be?

Thanks for your feedback @johan.borgman!

Yes, I just figured out what happened :slight_smile:
The current releases are the following:

home-assistant:/config# curl -s -X GET https://hub.docker.com/v2/namespaces/esphome/repositories/esphome/tags | jq -r '.results|.[]|.name'
latest
2024.1.0-dev20240118
dev
2024.1.0-dev20240117
2023.12.7
2023.12
beta
stable
2024.1.0-dev20240116
2023.12.6

As the command line tries to find the latest stable release of this year - and there is no release for this year yet - it fails and returns nothing.
The fix is to replace the command line:

curl -s -X GET https://hub.docker.com/v2/namespaces/esphome/repositories/esphome/tags | jq -r '.results|.[]|.name' | egrep -i "^$(date +'%Y')\.[0-9]{1,2}\.[0-9]{1,2}$" | sort -rn | head -1

with the following command line:

curl -s -X GET https://hub.docker.com/v2/namespaces/esphome/repositories/esphome/tags | jq -r '.results|.[]|.name' | egrep -i "^[0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2}$" | sort -rn | head -1

I’ll update this in my first post as well

Thank you @dominik4545 ! The new command line works perfectly.

1 Like