Conversation
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.
This pull request improves support for H-firmware TAPs in the parser by relaxing validation of the
status_typebits in RECEIVE_RESPONSE frames, updating documentation to clarify the bitmask meaning, and adding new tests to ensure compatibility with both G-firmware and H-firmware. It also refines the coordinator save scheduling logic to use a throttle pattern for more robust state persistence.Parser and protocol improvements:
_handle_receive_responsemethod inparser.pyto no longer validate bits 5-7 ofstatus_type, allowing H-firmware frames (with bits 5-7 cleared) to be parsed correctly. Only bits 0-4 are now used to determine optional fields.test_parser.pyto verify that RECEIVE_RESPONSE parsing works for both H-firmware (bits 5-7 cleared) and G-firmware (bits 5-7 set), including power report extraction and handling of empty responses.Documentation updates:
implementation_plan.mdto clarify that bits 5-7 ofstatus_typeare firmware-dependent flags with no effect on payload structure, and removed the requirement to validate these bits. [1] [2]Coordinator state persistence:
_schedule_savelogic incoordinator.pyto use a throttle pattern instead of debounce, ensuring that state saves are not repeatedly rescheduled under rapid updates and are always persisted within the expected delay window.