mirror of
https://github.com/home-assistant/core.git
synced 2026-07-02 20:26:16 +01:00
d766aae436
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: frenck <195327+frenck@users.noreply.github.com>
27 lines
840 B
Python
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,
|
|
)
|