Force entity_id update for discovered entities?

Tags: #<Tag:0x00007f73901c3af8> #<Tag:0x00007f73901c3a30> #<Tag:0x00007f73901c3850>

Hi everybody,

is there a user friendly way to “force” Home Assistant to do this? Example:

I pair a new device with my zigbee2mqtt service. This device will automatically be called something like 0x0012a3234e1124234 in z2m; as z2m is connected to Home Assistant via mqtt, this will also create, for example sensor.0x0012a3234e1124234_linkquality.

What I usually then do is stop z2m, edit the configuration.yaml, and start it again. The device now has a friendly name, for example CC2530/Draussen.

Home Assistant will set the new friendly_name, so this device will show up as CC2530/Draussen. However, it will still be identified as sensor.0x0012a3234e1124234_linkquality.

I used to delete the .storage folder in my Home Assistant root directory and then restart. All entities would now have the entity_ids I wanted/expected. BUT there are too many things stored in this folder, so I cannot / don’t want to do this every single time.

I know that I can manually change the entity_id through the web interface - but while this is fine for one thing (even though most zigbee2mqtt devices are mulitple entites => temperature, humidity, pressure, link quality, etc. etc. - which ALL have to manually be changed then, as they are separate entities), this gets very frustrating when dealing with multiple entities.

Is there a service I missed that can do this? Run an update on already discovered entities and -if any values have changed- correct the existing entities so that they show the correct information?

Thank you for your help :slight_smile: