hass-core/homeassistant/components/romy/entity.py
Joost Lekkerkerker 6bb4e7d62c
Bump ruff to 0.3.4 (#112690)
Co-authored-by: Sid <27780930+autinerd@users.noreply.github.com>
Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick@koston.org>
2024-03-26 00:02:16 +01:00

24 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,
)