2023-12-04 20:13:15 +00:00
|
|
|
"""Wyoming entities."""
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from homeassistant.helpers import entity
|
2024-05-15 20:17:49 +00:00
|
|
|
from homeassistant.helpers.device_registry import DeviceEntryType, DeviceInfo
|
2023-12-04 20:13:15 +00:00
|
|
|
|
|
|
|
from .const import DOMAIN
|
|
|
|
from .satellite import SatelliteDevice
|
|
|
|
|
|
|
|
|
|
|
|
class WyomingSatelliteEntity(entity.Entity):
|
|
|
|
"""Wyoming satellite entity."""
|
|
|
|
|
|
|
|
_attr_has_entity_name = True
|
|
|
|
_attr_should_poll = False
|
|
|
|
|
|
|
|
def __init__(self, device: SatelliteDevice) -> None:
|
|
|
|
"""Initialize entity."""
|
|
|
|
self._device = device
|
|
|
|
self._attr_unique_id = f"{device.satellite_id}-{self.entity_description.key}"
|
|
|
|
self._attr_device_info = DeviceInfo(
|
|
|
|
identifiers={(DOMAIN, device.satellite_id)},
|
2024-05-15 20:17:49 +00:00
|
|
|
entry_type=DeviceEntryType.SERVICE,
|
2023-12-04 20:13:15 +00:00
|
|
|
)
|