1
0
mirror of https://github.com/home-assistant/core.git synced 2026-05-08 09:38:58 +01:00
Files
core/homeassistant/components/youless/entity.py
T
2025-01-23 13:35:21 +01:00

26 lines
841 B
Python

"""The entity for the Youless integration."""
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .coordinator import YouLessCoordinator
class YouLessEntity(CoordinatorEntity[YouLessCoordinator]):
"""Base entity for YouLess."""
def __init__(
self, coordinator: YouLessCoordinator, device_group: str, device_name: str
) -> None:
"""Initialize the entity."""
super().__init__(coordinator)
self.device = coordinator.device
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, device_group)},
manufacturer="YouLess",
model=self.device.model,
name=device_name,
sw_version=self.device.firmware_version,
)