mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Migrate Oncue to has entity name (#98812)
This commit is contained in:
parent
1369874348
commit
09efd1c972
@ -20,6 +20,8 @@ class OncueEntity(
|
|||||||
):
|
):
|
||||||
"""Representation of an Oncue entity."""
|
"""Representation of an Oncue entity."""
|
||||||
|
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
coordinator: DataUpdateCoordinator[dict[str, OncueDevice]],
|
coordinator: DataUpdateCoordinator[dict[str, OncueDevice]],
|
||||||
@ -33,7 +35,7 @@ class OncueEntity(
|
|||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
self._device_id = device_id
|
self._device_id = device_id
|
||||||
self._attr_unique_id = f"{device_id}_{description.key}"
|
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(
|
self._attr_device_info = DeviceInfo(
|
||||||
identifiers={(DOMAIN, device_id)},
|
identifiers={(DOMAIN, device_id)},
|
||||||
name=device.name,
|
name=device.name,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user