1
0
mirror of https://github.com/home-assistant/core.git synced 2026-07-02 20:26:16 +01:00
Files
core/homeassistant/components/powerfox_local/entity.py
T
2026-04-30 21:14:48 +02:00

27 lines
840 B
Python

"""Base entity for Powerfox Local."""
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .coordinator import PowerfoxLocalDataUpdateCoordinator
class PowerfoxLocalEntity(CoordinatorEntity[PowerfoxLocalDataUpdateCoordinator]):
"""Base entity for Powerfox Local."""
_attr_has_entity_name = True
def __init__(
self,
coordinator: PowerfoxLocalDataUpdateCoordinator,
) -> None:
"""Initialize Powerfox Local entity."""
super().__init__(coordinator)
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, coordinator.device_id)},
manufacturer="Powerfox",
model="Poweropti",
serial_number=coordinator.device_id,
)