2022.11.1 MQTT device names do not cascade to entities

Upgraded to 2022.11.1 and received a notice to move MQTT config from configuration.yaml to the UI. I removed the entries in configuration.yaml, and I added the new integration. Unfortunately, now all my entity names are wrong. Used to be I could change the device name, and the name would cascade down to the entities. Now, it no longer does.

I’d rather not have to update 200+ entity names.

restore, and install from the UI before removing the old one and your names will persist. The removal + restart is what killed the integration’s naming.

Also, device → entity naming still works. Just did it this morning with a zigbee2mqtt mqtt device.

Also, 2022.11.1 isn’t out yet, maybe you’re mistaken?

Yes, I was mistaken. I have 2022.11.0.

I went back and restored from my nightly backup, removed mqtt from configuration.yaml, and restarted. When I did only that, everything came back correctly. My mistake before was to remove the MQTT integration and add it back with the UI, following the documentation.

When I did this, device —> entity naming did not work for me. No matter what I changed my device name to, no entities changed names.

There’s a confirmation that pushes it on every rename. That always pops up, if you aren’t getting it, you may be in the wrong spot. How are you naming the device?

Done this hundreds of times.

  1. View the device
  2. Click the pencil on the upper right
  3. Change the name
  4. Confirmation dialog comes up asking me if I want to update entity names as well. Choose “Update”.

Entity names were not changed.

It only changes names that have common elements with the device name. It’s always worked like that too btw. Also, if this didn’t work, it wouldn’t work for any integration.

e.g.

Device name is: Foo Bar
entity 1 is: Foo Bar Status
entity 2 is: Bar Foo Status

When renaming the device, the entity Foo Bar Status will change names (and entity_id) where Bar Foo Status will not.


Edit: Just tested it out (again) and it’s working perfectly. You must not have common elements in your names.

That was the problem then. When I replace the integration, I ended up with names like:

Device Name: HT Office
Entity Name: sensor.ht_office_shelly_45763_temperature

Interesting that the device name didn’t get HT Office Shelly 45763.

No worries though. Not deleting the MQTT integration (only removing the entries from configuration.yaml) left all my names alone, and everything works fine.

Yet another reason to always have backups. :slight_smile: