Drop unnecessary copy from entitydescription.name to _attr_name (#88251)

pull/88251/merge
Erik Montnemery 2023-02-16 13:54:32 +01:00 committed by GitHub
parent ba23816a0c
commit 601ac3d9a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 0 additions and 7 deletions

View File

@ -350,7 +350,6 @@ class AirQSensor(CoordinatorEntity, SensorEntity):
self.entity_description: AirQEntityDescription = description
self._attr_device_info = coordinator.device_info
self._attr_name = description.name
self._attr_unique_id = f"{coordinator.device_id}_{description.key}"
self._attr_native_value = description.value(coordinator.data)

View File

@ -119,7 +119,6 @@ class FileSizeCoordinator(DataUpdateCoordinator):
class FilesizeEntity(CoordinatorEntity[FileSizeCoordinator], SensorEntity):
"""Filesize sensor."""
entity_description: SensorEntityDescription
_attr_has_entity_name = True
def __init__(
@ -132,7 +131,6 @@ class FilesizeEntity(CoordinatorEntity[FileSizeCoordinator], SensorEntity):
"""Initialize the Filesize sensor."""
super().__init__(coordinator)
base_name = path.split("/")[-1]
self._attr_name = description.name
self._attr_unique_id = (
entry_id if description.key == "file" else f"{entry_id}-{description.key}"
)

View File

@ -54,7 +54,6 @@ class LIFXHevCycleBinarySensorEntity(LIFXSensorEntity, BinarySensorEntity):
"""Initialise the sensor."""
super().__init__(coordinator)
self.entity_description = description
self._attr_name = description.name
self._attr_unique_id = f"{coordinator.parent.serial_number}_{description.key}"
self._async_update_attrs()

View File

@ -74,7 +74,6 @@ class LIFXInfraredBrightnessSelectEntity(LIFXSensorEntity, SelectEntity):
"""Initialise the IR brightness config entity."""
super().__init__(coordinator)
self.entity_description = description
self._attr_name = description.name
self._attr_unique_id = f"{coordinator.parent.serial_number}_{description.key}"
self._attr_current_option = coordinator.current_infrared_brightness
@ -108,7 +107,6 @@ class LIFXThemeSelectEntity(LIFXSensorEntity, SelectEntity):
super().__init__(coordinator)
self.entity_description = description
self._attr_name = description.name
self._attr_unique_id = f"{coordinator.parent.serial_number}_{description.key}"
self._attr_current_option = None

View File

@ -52,7 +52,6 @@ class LIFXRssiSensor(LIFXSensorEntity, SensorEntity):
super().__init__(coordinator)
self.entity_description = description
self._attr_name = description.name
self._attr_unique_id = f"{coordinator.parent.serial_number}_{description.key}"
self._attr_native_unit_of_measurement = coordinator.rssi_uom