When my integration defines an entity with an init as follows:
Where device_id is the same across more than one of the same type of entity
_attr_has_entity_name = True
def __init__(self):
...
self._attr_device_info = DeviceInfo({
"identifiers": { (DOMAIN, device_id) },
...
} )
vs as follows:
where unique_entity_id is unique per entity
_attr_has_entity_name = True
def __init__(self):
...
self._attr_device_info = DeviceInfo({
"identifiers": { (DOMAIN, unique_entity_id) },
...
} )
Then if a user changes the name of the entity in the HA interface, upon restarting HA the entities name reverts back to the default and the users change appears to be lost.
Why is that and how could I work around this or better implement it?
Thanks