Fix ScheduleType.schedule_sub_type reading the wrong JSON key - #166
Merged
timmo001 merged 2 commits intoAug 10, 2026
Conversation
Resideo's API returns "scheduleSubtype" (lowercase t) for both device and location responses, not "scheduleSubType". Found while auditing device.py for the same class of field-name mismatch fixed in the priority endpoint (timmo001#165). Not currently consumed anywhere in Home Assistant's lyric integration, so this was never visibly broken, but the fixtures encoded the same wrong key the code was reading, so the existing tests passed without ever catching it against a real response.
timmo001
requested changes
Aug 10, 2026
timmo001
left a comment
Owner
There was a problem hiding this comment.
The API docs use scheduleSubType here: https://developer.honeywellhome.com/lyric/apis/get/devices/thermostats/%7BdeviceId%7D-0. Can we support both keys? Replacing it outright means responses matching the documented schema will return None.
Resideo's docs specify scheduleSubType, but the live API sends scheduleSubtype (lowercase t). Check the documented key first and fall back to the observed one so neither response shape reads back None. Addresses review feedback on timmo001#166. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
timmo001
approved these changes
Aug 10, 2026
1 task
This was referenced Aug 10, 2026
clutch2sft
added a commit
to clutch2sft/aiolyric
that referenced
this pull request
Aug 10, 2026
Resideo's docs specify lowercase day/period, but a live capture from a T9-T10 account shows the API actually sending PascalCase Day/Period (same casing mismatch as vacationHold.enabled/Enabled, currently under review on timmo001#170). Check the documented key first and fall back to the observed one so neither response shape reads back None. Found while auditing device.py for the class of field-name/casing mismatch raised in review on timmo001#166 and timmo001#170. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resideo's API returns "scheduleSubtype" (lowercase t) for both device and location responses, not "scheduleSubType". Found while auditing device.py for the same class of field-name mismatch fixed in the priority endpoint (#165). Not currently consumed anywhere in Home Assistant's lyric integration, so this was never visibly broken, but the fixtures encoded the same wrong key the code was reading, so the existing tests passed without ever catching it against a real response.