diff --git a/custom_components/luxtronik/binary_sensor.py b/custom_components/luxtronik/binary_sensor.py index b983724..30396c0 100644 --- a/custom_components/luxtronik/binary_sensor.py +++ b/custom_components/luxtronik/binary_sensor.py @@ -87,7 +87,7 @@ def __init__(self, luxtronik, sensor, friendly_name, icon, invert_state): self._icon = icon self._invert = invert_state self._attr_unique_id = ENTITY_ID_FORMAT.format( - slugify(self._sensor.name if not self._name else self._name) + slugify(self._sensor.name) ) @property diff --git a/custom_components/luxtronik/sensor.py b/custom_components/luxtronik/sensor.py index c377367..a47ccdc 100644 --- a/custom_components/luxtronik/sensor.py +++ b/custom_components/luxtronik/sensor.py @@ -92,7 +92,7 @@ def __init__(self, luxtronik, sensor, friendly_name, icon, state_class): self._icon = icon self._state_class = state_class self._attr_unique_id = ENTITY_ID_FORMAT.format( - slugify(self._sensor.name if not self._name else self._name) + slugify(self._sensor.name) ) @property