Skip to content

Store LyricPriority object in priorities_dict#138

Merged
timmo001 merged 1 commit into
timmo001:masterfrom
yonib05:store-priority-object
May 6, 2026
Merged

Store LyricPriority object in priorities_dict#138
timmo001 merged 1 commit into
timmo001:masterfrom
yonib05:store-priority-object

Conversation

@yonib05

@yonib05 yonib05 commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

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.

@timmo001 timmo001 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@timmo001 timmo001 merged commit 079ecf6 into timmo001:master May 6, 2026
5 of 10 checks passed
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.

2 participants