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.
romy
romy
romy = coordinator.romy
19
self.
_attr_device_info
_attr_device_info =
DeviceInfo
(
20
identifiers={(DOMAIN, self.
romy
romy
romy.unique_id)},
21
manufacturer=
"ROMY"
,
22
name=self.
romy
romy
romy.name,
23
model=self.
romy
romy
romy.model,
24
)
homeassistant.components.romy.coordinator.RomyVacuumCoordinator.romy
romy
Definition:
coordinator.py:18
homeassistant.components.romy.entity.RomyEntity
Definition:
entity.py:10
homeassistant.components.romy.entity.RomyEntity._attr_device_info
_attr_device_info
Definition:
entity.py:19
homeassistant.components.romy.entity.RomyEntity.romy
romy
Definition:
entity.py:18
homeassistant.components.romy.entity.RomyEntity.__init__
None __init__(self, RomyVacuumCoordinator coordinator)
Definition:
entity.py:15
homeassistant.helpers.device_registry.DeviceInfo
Definition:
device_registry.py:98
homeassistant.helpers.update_coordinator.CoordinatorEntity
Definition:
update_coordinator.py:568
homeassistant.helpers.device_registry
Definition:
device_registry.py:1
homeassistant.helpers.update_coordinator
Definition:
update_coordinator.py:1
core
homeassistant
components
romy
entity.py
Generated by
1.9.1