Files
home-assistant-core/homeassistant/components/romy/entity.py
T
6bb4e7d62c Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <[email protected]>
Co-authored-by: Marc Mueller <[email protected]>
Co-authored-by: J. Nick Koston <[email protected]>
2024-03-26 00:02:16 +01:00

25 lines
754 B
Python

"""Base entity for ROMY."""
from homeassistant.helpers.device_registry import DeviceInfo
from homeassistant.helpers.update_coordinator import CoordinatorEntity
from .const import DOMAIN
from .coordinator import RomyVacuumCoordinator
class RomyEntity(CoordinatorEntity[RomyVacuumCoordinator]):
"""Base ROMY entity."""
_attr_has_entity_name = True
def __init__(self, coordinator: RomyVacuumCoordinator) -> None:
"""Initialize ROMY entity."""
super().__init__(coordinator)
self.romy = coordinator.romy
self._attr_device_info = DeviceInfo(
identifiers={(DOMAIN, self.romy.unique_id)},
manufacturer="ROMY",
name=self.romy.name,
model=self.romy.model,
)