Home Assistant Unofficial Reference
2024.12.1
entity.py
Go to the documentation of this file.
1
"""Smarty Entity class."""
2
3
from
homeassistant.helpers.device_registry
import
DeviceInfo
4
from
homeassistant.helpers.update_coordinator
import
CoordinatorEntity
5
6
from
.
import
DOMAIN
7
from
.coordinator
import
SmartyCoordinator
8
9
10
class
SmartyEntity
(
CoordinatorEntity
[SmartyCoordinator]):
11
"""Representation of a Smarty Entity."""
12
13
_attr_has_entity_name =
True
14
15
def
__init__
(self, coordinator: SmartyCoordinator) ->
None
:
16
"""Initialize the entity."""
17
super().
__init__
(coordinator)
18
self.
_attr_device_info
_attr_device_info =
DeviceInfo
(
19
identifiers={(DOMAIN, coordinator.config_entry.entry_id)},
20
manufacturer=
"Salda"
,
21
sw_version=self.coordinator.software_version,
22
hw_version=self.coordinator.configuration_version,
23
)
homeassistant.components.smarty.entity.SmartyEntity
Definition:
entity.py:10
homeassistant.components.smarty.entity.SmartyEntity.__init__
None __init__(self, SmartyCoordinator coordinator)
Definition:
entity.py:15
homeassistant.components.smarty.entity.SmartyEntity._attr_device_info
_attr_device_info
Definition:
entity.py:18
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
smarty
entity.py
Generated by
1.9.1