Skip to content

Store LyricPriority object in priorities_dict#138

Open
yonib05 wants to merge 1 commit intotimmo001:masterfrom
yonib05:store-priority-object
Open

Store LyricPriority object in priorities_dict#138
yonib05 wants to merge 1 commit intotimmo001:masterfrom
yonib05:store-priority-object

Conversation

@yonib05
Copy link
Copy Markdown

@yonib05 yonib05 commented Apr 10, 2026

get_thermostat_rooms currently parses the priority API response but only stores the room objects, discarding the LyricPriority wrapper. This means consumers can't read current_priority.priority_type or current_priority.selected_rooms without making another API call.

This adds a priorities_dict property (keyed by device MAC, same as rooms_dict) that stores the full LyricPriority object.

Needed for an upcoming Home Assistant PR that adds a select entity to control room priority — it needs to read the current priority type and selected rooms from the coordinator data.

Related: #134 (update_priority fix)

The get_thermostat_rooms method now stores the full LyricPriority
object keyed by device MAC address, making priority_type and
selected_rooms accessible to consumers without additional API calls.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant