1 """The Honeywell Lyric integration."""
3 from __future__
import annotations
5 from aiolyric
import Lyric
6 from aiolyric.objects.device
import LyricDevice
7 from aiolyric.objects.location
import LyricLocation
8 from aiolyric.objects.priority
import LyricAccessory, LyricRoom
14 DataUpdateCoordinator,
19 """Defines a base Honeywell Lyric entity."""
21 _attr_has_entity_name =
True
25 coordinator: DataUpdateCoordinator[Lyric],
26 location: LyricLocation,
30 """Initialize the Honeywell Lyric entity."""
40 """Return the unique ID for this entity."""
45 """Get the Lyric Location."""
46 return self.coordinator.data.locations_dict[self.
_location_location.location_id]
50 """Get the Lyric Device."""
55 """Defines a Honeywell Lyric device entity."""
59 """Return device information about this Honeywell Lyric instance."""
61 identifiers={(dr.CONNECTION_NETWORK_MAC, self.
_mac_id_mac_id)},
62 connections={(dr.CONNECTION_NETWORK_MAC, self.
_mac_id_mac_id)},
63 manufacturer=
"Honeywell",
64 model=self.
devicedevice.device_model,
65 name=f
"{self.device.name} Thermostat",
70 """Defines a Honeywell Lyric accessory entity, a sub-device of a thermostat."""
74 coordinator: DataUpdateCoordinator[Lyric],
75 location: LyricLocation,
78 accessory: LyricAccessory,
81 """Initialize the Honeywell Lyric accessory entity."""
82 super().
__init__(coordinator, location, device, key)
88 """Return device information about this Honeywell Lyric instance."""
92 f
"{dr.CONNECTION_NETWORK_MAC}_room_accessory",
93 f
"{self._mac_id}_room{self._room_id}_accessory{self._accessory_id}",
96 manufacturer=
"Honeywell",
98 name=f
"{self.room.room_name} Sensor",
99 via_device=(dr.CONNECTION_NETWORK_MAC, self.
_mac_id_mac_id),
104 """Get the Lyric Device."""
105 return self.coordinator.data.rooms_dict[self.
_mac_id_mac_id][self.
_room_id_room_id]
109 """Get the Lyric Device."""
112 for accessory
in self.
roomroom.accessories
None __init__(self, DataUpdateCoordinator[Lyric] coordinator, LyricLocation location, LyricDevice device, LyricRoom room, LyricAccessory accessory, str key)
DeviceInfo device_info(self)
LyricAccessory accessory(self)
DeviceInfo device_info(self)
None __init__(self, DataUpdateCoordinator[Lyric] coordinator, LyricLocation location, LyricDevice device, str key)
LyricLocation location(self)