Migrate Oncue to has entity name (#98812)

This commit is contained in:
Joost Lekkerkerker 2023-08-22 14:37:33 +02:00 committed by GitHub
parent 1369874348
commit 09efd1c972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -20,6 +20,8 @@ class OncueEntity(
):
"""Representation of an Oncue entity."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: DataUpdateCoordinator[dict[str, OncueDevice]],
@ -33,7 +35,7 @@ class OncueEntity(
self.entity_description = description
self._device_id = device_id
self._attr_unique_id = f"{device_id}_{description.key}"
self._attr_name = f"{device.name} {sensor.display_name}"
self._attr_name = sensor.display_name
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, device_id)},
name=device.name,