mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 04:07:08 +00:00
Fix poolsense naming (#117567)
This commit is contained in:
parent
d019c25ae4
commit
ba395fb9f3
@ -1,9 +1,10 @@
|
|||||||
"""Base entity for poolsense integration."""
|
"""Base entity for poolsense integration."""
|
||||||
|
|
||||||
|
from homeassistant.helpers.device_registry import DeviceInfo
|
||||||
from homeassistant.helpers.entity import EntityDescription
|
from homeassistant.helpers.entity import EntityDescription
|
||||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||||
|
|
||||||
from .const import ATTRIBUTION
|
from .const import ATTRIBUTION, DOMAIN
|
||||||
from .coordinator import PoolSenseDataUpdateCoordinator
|
from .coordinator import PoolSenseDataUpdateCoordinator
|
||||||
|
|
||||||
|
|
||||||
@ -11,6 +12,7 @@ class PoolSenseEntity(CoordinatorEntity[PoolSenseDataUpdateCoordinator]):
|
|||||||
"""Implements a common class elements representing the PoolSense component."""
|
"""Implements a common class elements representing the PoolSense component."""
|
||||||
|
|
||||||
_attr_attribution = ATTRIBUTION
|
_attr_attribution = ATTRIBUTION
|
||||||
|
_attr_has_entity_name = True
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
@ -21,5 +23,8 @@ class PoolSenseEntity(CoordinatorEntity[PoolSenseDataUpdateCoordinator]):
|
|||||||
"""Initialize poolsense sensor."""
|
"""Initialize poolsense sensor."""
|
||||||
super().__init__(coordinator)
|
super().__init__(coordinator)
|
||||||
self.entity_description = description
|
self.entity_description = description
|
||||||
self._attr_name = f"PoolSense {description.name}"
|
|
||||||
self._attr_unique_id = f"{email}-{description.key}"
|
self._attr_unique_id = f"{email}-{description.key}"
|
||||||
|
self._attr_device_info = DeviceInfo(
|
||||||
|
identifiers={(DOMAIN, email)},
|
||||||
|
model="PoolSense",
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user