mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Fix poolsense naming (#117567)
This commit is contained in:
parent
d019c25ae4
commit
ba395fb9f3
@ -1,9 +1,10 @@
|
||||
"""Base entity for poolsense integration."""
|
||||
|
||||
from homeassistant.helpers.device_registry import DeviceInfo
|
||||
from homeassistant.helpers.entity import EntityDescription
|
||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||
|
||||
from .const import ATTRIBUTION
|
||||
from .const import ATTRIBUTION, DOMAIN
|
||||
from .coordinator import PoolSenseDataUpdateCoordinator
|
||||
|
||||
|
||||
@ -11,6 +12,7 @@ class PoolSenseEntity(CoordinatorEntity[PoolSenseDataUpdateCoordinator]):
|
||||
"""Implements a common class elements representing the PoolSense component."""
|
||||
|
||||
_attr_attribution = ATTRIBUTION
|
||||
_attr_has_entity_name = True
|
||||
|
||||
def __init__(
|
||||
self,
|
||||
@ -21,5 +23,8 @@ class PoolSenseEntity(CoordinatorEntity[PoolSenseDataUpdateCoordinator]):
|
||||
"""Initialize poolsense sensor."""
|
||||
super().__init__(coordinator)
|
||||
self.entity_description = description
|
||||
self._attr_name = f"PoolSense {description.name}"
|
||||
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