mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Set device name as entity name for Comelit lights (#100986)
Fix entity name for Comelit lights
This commit is contained in:
parent
4788dd2905
commit
d2bcf88bbf
@ -36,6 +36,7 @@ class ComelitLightEntity(CoordinatorEntity[ComelitSerialBridge], LightEntity):
|
||||
"""Light device."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_name = None
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -47,7 +48,6 @@ class ComelitLightEntity(CoordinatorEntity[ComelitSerialBridge], LightEntity):
|
||||
self._api = coordinator.api
|
||||
self._device = device
|
||||
super().__init__(coordinator)
|
||||
self._attr_name = device.name
|
||||
self._attr_unique_id = f"{config_entry_unique_id}-{device.index}"
|
||||
self._attr_device_info = self.coordinator.platform_device_info(device, LIGHT)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user