Open michalk-k opened 2 days ago
I use this naming pattern: "Myčka $name" and it is presented as
Yes. But changing the pattern doesn't change entity names. how to enforce that?
I see. It is a quite long time I have renamed it, but I think I have reinstalled the integration.
The integration generates the names based on the configured pattern. I see that you already found how to change the pattern and that is the right way to do it. After a restart/reload the integration will change the display names to match the new pattern, however, there may be some entities that are not renamed because they are unavailable. Those entities will be renamed the next time they become available. Note that if you change the names using HA that will override any name set by the integration and the pattern you set will be ignored.
Thank you. Good to know that it's enough to wait. I have an impression that Reload didn't make the job (to any of the entities).
I believe it should but didn't test it. If it doesn't, try restarting HA, that should definitely do it.
Neither reloading nor restart helped. I had to remove the integrated devices/entities (see screenshot) and re-add it afterwards
The problem with such approach is, that a user has no option to select the entity naming pattern before adding entities. And tbh at that step the new user has no idea about how device and entity names and their relationship.
BTW I found that user may want to change device name - the integration doesn't provide such option during adding the device. It uses name provided by API.
Fortunatelly (for me), after adding devices (thus their entities too) I changed the pattern, and it did work this time, renaming already existing entities. So I'm happy right now I achieved cleaner view.
Now I'm really confused, why changing had effect on entity names this time, just after adding them, while it wasn't working before. (btw hyphen in name pattern prevents HA from automatic prefix removal)
And let me ask again for device renaming process. If a user uses a device rename option, is it HA core code which renames entities, or it's integration code? Why changing a device name results in renaming entities leading to the mess described in the OP? I just wanted to change device name to match prefix of already existing entity names. The message which pops up, that no entity will be renamed is even more confusing.
with regards
As I mentioned, once you rename entities using the HA UI it takes over the names and they will be managed by HA, which will most likely create the kind of mess you experienced. Changing the name template through the integration's "configure" UI will take effect without requiring removing and re-adding the integration.
Currently, the default pattern for entity names is prefixed by
$brand $appliance -
It prevents HA from automatically shortening names on Device View. Making their names unreadableIf the beginning of entity name equals Device name, the prefix is stripped out.
Now question: what part of the system is responsible for renaming entities while renaming the device? I though that by renaming the device to match entity prefixes, I will clean up the Device page. Unfortunatelly it ended up with even bigger mess:
Susicka
toBosch Susicka
, HA informed me, that no (out of 49 or so) entities will be renamedBosch Bosch Susicka
,Bosch Susicka
,Bosch Susicka Bosch
Just wonder if should I raise an issue to HA Core, or if the renaming is done by the component, with the issue in applying the predefined pattern.