Home Assistant Unofficial Reference 2024.12.1
entity.py
Go to the documentation of this file.
1 """Base entity for ROMY."""
2 
3 from homeassistant.helpers.device_registry import DeviceInfo
4 from homeassistant.helpers.update_coordinator import CoordinatorEntity
5 
6 from .const import DOMAIN
7 from .coordinator import RomyVacuumCoordinator
8 
9 
10 class RomyEntity(CoordinatorEntity[RomyVacuumCoordinator]):
11  """Base ROMY entity."""
12 
13  _attr_has_entity_name = True
14 
15  def __init__(self, coordinator: RomyVacuumCoordinator) -> None:
16  """Initialize ROMY entity."""
17  super().__init__(coordinator)
18  self.romyromyromy = coordinator.romy
19  self._attr_device_info_attr_device_info = DeviceInfo(
20  identifiers={(DOMAIN, self.romyromyromy.unique_id)},
21  manufacturer="ROMY",
22  name=self.romyromyromy.name,
23  model=self.romyromyromy.model,
24  )
None __init__(self, RomyVacuumCoordinator coordinator)
Definition: entity.py:15