Migrate Abode to new entity naming style (#76673)
This commit is contained in:
parent
0293db343f
commit
e033c8b380
2 changed files with 1 additions and 2 deletions
|
@ -248,6 +248,7 @@ class AbodeEntity(entity.Entity):
|
|||
"""Representation of an Abode entity."""
|
||||
|
||||
_attr_attribution = ATTRIBUTION
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(self, data: AbodeSystem) -> None:
|
||||
"""Initialize Abode entity."""
|
||||
|
@ -283,7 +284,6 @@ class AbodeDevice(AbodeEntity):
|
|||
"""Initialize Abode device."""
|
||||
super().__init__(data)
|
||||
self._device = device
|
||||
self._attr_name = device.name
|
||||
self._attr_unique_id = device.device_uuid
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
|
|
|
@ -64,7 +64,6 @@ class AbodeSensor(AbodeDevice, SensorEntity):
|
|||
"""Initialize a sensor for an Abode device."""
|
||||
super().__init__(data, device)
|
||||
self.entity_description = description
|
||||
self._attr_name = f"{device.name} {description.name}"
|
||||
self._attr_unique_id = f"{device.device_uuid}-{description.key}"
|
||||
if description.key == CONST.TEMP_STATUS_KEY:
|
||||
self._attr_native_unit_of_measurement = device.temp_unit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue