1 parent 58c8364 commit 4b662d8Copy full SHA for 4b662d8
1 file changed
custom_components/victron_mqtt/entity.py
@@ -41,6 +41,8 @@ def __init__(
41
entity_id = f"{entity_platform}.{ENTITY_PREFIX}_{metric.unique_id}"
42
else:
43
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
46
self._attr_unique_id = entity_id
47
self._attr_suggested_display_precision = metric.precision
48
self._attr_translation_key = metric.generic_short_id.replace("{", "").replace(
0 commit comments