From ed5b35431adca6418b59301ee050305ac7e7b373 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sat, 18 Jun 2022 23:19:31 -0400 Subject: [PATCH 1/2] Set entity description --- custom_components/matter_experimental/entity.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/matter_experimental/entity.py b/custom_components/matter_experimental/entity.py index 545cb433..464a34ff 100644 --- a/custom_components/matter_experimental/entity.py +++ b/custom_components/matter_experimental/entity.py @@ -23,6 +23,7 @@ class MatterEntity(entity.Entity): def __init__(self, device: MatterDevice, mapping: DeviceMapping) -> None: self._device = device self._device_mapping = mapping + self._entity_description = mapping.entity_description self._attr_unique_id = f"{device.node.matter.client.server_info.compressedFabricId}-{device.node.unique_id}-{device.endpoint_id}-{device.device_type.device_type}" @property From 7f185774e97fe5c7df1be408975080b17769df7c Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 19 Jun 2022 08:06:40 -0400 Subject: [PATCH 2/2] Update custom_components/matter_experimental/entity.py Co-authored-by: Stefan Agner --- custom_components/matter_experimental/entity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/matter_experimental/entity.py b/custom_components/matter_experimental/entity.py index 464a34ff..a0b152b3 100644 --- a/custom_components/matter_experimental/entity.py +++ b/custom_components/matter_experimental/entity.py @@ -23,7 +23,8 @@ class MatterEntity(entity.Entity): def __init__(self, device: MatterDevice, mapping: DeviceMapping) -> None: self._device = device self._device_mapping = mapping - self._entity_description = mapping.entity_description + if mapping.entity_description: + self.entity_description = mapping.entity_description self._attr_unique_id = f"{device.node.matter.client.server_info.compressedFabricId}-{device.node.unique_id}-{device.endpoint_id}-{device.device_type.device_type}" @property