Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions aiolyric/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(
self._devices_dict: dict = {}
self._locations: list[LyricLocation] = []
self._locations_dict: dict = {}
self._priorities_dict: dict[str, LyricPriority] = {}
self._rooms_dict: dict = {}

@property
Expand Down Expand Up @@ -55,6 +56,11 @@ def locations_dict(self) -> dict:
"""Return the locations dict."""
return self._locations_dict

@property
def priorities_dict(self) -> dict[str, LyricPriority]:
"""Return the priorities dict, keyed by device MAC address."""
return self._priorities_dict

@property
def rooms_dict(self) -> dict[str, dict[str, LyricRoom]]:
"""Return the rooms dict."""
Expand Down Expand Up @@ -105,6 +111,7 @@ async def get_thermostat_rooms(

# device id in the priority payload refers to the mac address of the device
mac_id = priority.device_id
self._priorities_dict[mac_id] = priority
self._rooms_dict[mac_id] = {}

# add each room to the room dictionary. Rooms contain motion, temp, and humidity averages for all accessories in a room
Expand Down
Loading