Skip to content

Commit 4b662d8

Browse files
committed
Fix regression in simple_naming==false
1 parent 58c8364 commit 4b662d8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

custom_components/victron_mqtt/entity.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ def __init__(
4141
entity_id = f"{entity_platform}.{ENTITY_PREFIX}_{metric.unique_id}"
4242
else:
4343
entity_id = f"{entity_platform}.{ENTITY_PREFIX}_{installation_id}_{metric.unique_id}"
44+
# you have to set the entity_id if we want to make the unique_id different from the default entity_id generation (which is based on the entity name)
45+
self.entity_id = entity_id
4446
self._attr_unique_id = entity_id
4547
self._attr_suggested_display_precision = metric.precision
4648
self._attr_translation_key = metric.generic_short_id.replace("{", "").replace(

0 commit comments

Comments
 (0)