File tree Expand file tree Collapse file tree
custom_components/victron_mqtt Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,9 +75,8 @@ def __init__(
7575 # (e.g. solarcharger_3_solarcharger_total_pv_yield ->
7676 # solarcharger_3_total_pv_yield). Home Assistant applies a suggested
7777 # entity_id only when first creating an entity, so this affects NEW
78- # entities only; existing installs are unchanged. getattr keeps it
79- # safe if the bundled library predates display_id.
80- display_id = getattr (metric , "display_id" , metric .unique_id )
78+ # entities only; existing installs are unchanged.
79+ display_id = metric .display_id
8180 self ._attr_unique_id = f"{ entity_platform } .{ ENTITY_PREFIX } _{ installation_id } _{ metric .unique_id } "
8281 self .entity_id = f"{ entity_platform } .{ ENTITY_PREFIX } _{ installation_id } _{ display_id } "
8382 self ._attr_suggested_display_precision = metric .precision
You can’t perform that action at this time.
0 commit comments