Some (Z-wave) devices have different entity names from device name, probably due to some error during inclusion. This means that I cannot rename all associated entities, because none of them includes the name I’m editing from.
Meaning f.ex. “floor_heating_bathroom_x” is called “floor_heating_x_4” etc.
I also have some with the correct name, but still “_3” or “_4” at the end which I cannot bulk update.
I also noticed some devices have “air_temperature_2, 3, and 4" after each other, but in reality it is "floor", "air” “external_” “internal_temperature” etc. when used with other automation hubs.
In Home Assistant, there are times that device renaming does not ask to rename the entity_ids and device portion of the names of the entities. I have two temperature sensors that on my initial rename did not ask me to rename the entities at all when I changed the device name, and now no form of renaming seems to allow me to correctly rename the entities without individually going in and fixing them myself.
The renaming process should be robust and also fixable if it doesn’t work, as once you lose the string matching I think HA seems to be doing, it appears you have to rename manually, edit deeply burried yaml files, potentially use Spook (I think?), or use Python. None of those power user techniques should really be requirements for a fairly common task that also standard users (the direction HA is trying to go) regularly do.
I didn’t see another WTH on this, but happy to merge if there is.
I’m guessing it has something to do with the integration used, but not certain. Also, entities that are disabled don’t seem to get renamed. You got my vote!
I think that the linked WTH (which is mine) is a bit different from this one, but related. That one is about updating entity IDs in other places (automations, scripts, dashboards, etc) when you change an entity ID.
I think this other WTH (also mine) is more relevant here: WTH can’t I bulk rename entities - this one deals more with how to have HA let you quickly rename multiple entities for a device.
I wrote the now linked WTH. Question on your current workaround @petro, if an entiy ends up with a _2 etc. at the end does this workaround still work and will the entities now have the right device name but still have a _2 at the end? If the latter is true then that should also be addressed in the entity/device naming work.
I am sure this is easily fixable just doing multiple device renames. Also note that if you dont have “Advanced Mode” enabled you won’t be prompted if you want to rename.
Just rename the device back to the original name (or any name such that the slugified device name matches the desired portion of entity id), and then rename it a second time and you’ll be asked to rename.
If that’s not clear, give an example of what entities you’re trying to rename and I’ll give an example.
I found HA to not adjust my dashboards when I rename devices. So as I have different dashboards for just four family members, but for each of them different ones for tablet/laptop and small phone screens, it’s a pain in the butt to do a “name change”.