Fix Comelit comments as per late review (#102783)
This commit is contained in:
parent
b50f5e50c3
commit
e4a1efb680
4 changed files with 8 additions and 4 deletions
|
@ -51,7 +51,8 @@ class ComelitCoverEntity(
|
|||
self._api = coordinator.api
|
||||
self._device = device
|
||||
super().__init__(coordinator)
|
||||
# Use config_entry.entry_id as base for unique_id because no serial number or mac is available
|
||||
# Use config_entry.entry_id as base for unique_id
|
||||
# because no serial number or mac is available
|
||||
self._attr_unique_id = f"{config_entry_entry_id}-{device.index}"
|
||||
self._attr_device_info = coordinator.platform_device_info(device)
|
||||
# Device doesn't provide a status so we assume UNKNOWN at first startup
|
||||
|
|
|
@ -47,7 +47,8 @@ class ComelitLightEntity(CoordinatorEntity[ComelitSerialBridge], LightEntity):
|
|||
self._api = coordinator.api
|
||||
self._device = device
|
||||
super().__init__(coordinator)
|
||||
# Use config_entry.entry_id as base for unique_id because no serial number or mac is available
|
||||
# Use config_entry.entry_id as base for unique_id
|
||||
# because no serial number or mac is available
|
||||
self._attr_unique_id = f"{config_entry_entry_id}-{device.index}"
|
||||
self._attr_device_info = coordinator.platform_device_info(device)
|
||||
|
||||
|
|
|
@ -66,7 +66,8 @@ class ComelitSensorEntity(CoordinatorEntity[ComelitSerialBridge], SensorEntity):
|
|||
self._api = coordinator.api
|
||||
self._device = device
|
||||
super().__init__(coordinator)
|
||||
# Use config_entry.entry_id as base for unique_id because no serial number or mac is available
|
||||
# Use config_entry.entry_id as base for unique_id
|
||||
# because no serial number or mac is available
|
||||
self._attr_unique_id = f"{config_entry_entry_id}-{device.index}"
|
||||
self._attr_device_info = coordinator.platform_device_info(device)
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ class ComelitSwitchEntity(CoordinatorEntity[ComelitSerialBridge], SwitchEntity):
|
|||
self._api = coordinator.api
|
||||
self._device = device
|
||||
super().__init__(coordinator)
|
||||
# Use config_entry.entry_id as base for unique_id because no serial number or mac is available
|
||||
# Use config_entry.entry_id as base for unique_id
|
||||
# because no serial number or mac is available
|
||||
self._attr_unique_id = f"{config_entry_entry_id}-{device.type}-{device.index}"
|
||||
self._attr_device_info = coordinator.platform_device_info(device)
|
||||
if device.type == OTHER:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue