fix: auto-select v2 clean payload by firmware version (#37)#38
Draft
sjmotew wants to merge 1 commit into
Draft
Conversation
…rsion (#37) Adds _parse_firmware_version + _firmware_requires_v2 helpers. Flow firmware at or above v01.07.22.00 — the lowest confirmed-affected version from #36 (ralong777) and #37 (saeft2003, v01.08.00.07) — now skips the legacy clean payload entirely and sends v2 directly. Older firmware keeps the legacy-first behavior with NOT_APPLICABLE fallback. Catches the ack-and-ignore case from #37 where the legacy schema returns SUCCESS but the robot quietly runs its onboard plan (first Narwal-app shortcut) instead of the rooms HA requested. Unknown firmware versions default to legacy-first so we don't ship v2 prematurely to a robot that may not accept it. Extracts the v2 retry path in start() into _start_v2() with a reason tag so logs distinguish "firmware-known-v2" from "legacy-NOT_APPLICABLE". 10 new tests cover the version parser (edge cases: empty, malformed, short forms), the requires-v2 check against #36/#37 firmwares, and the start()/start_rooms() version-based shortcut. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Staged — do not merge until #37 outcome 3 is confirmed
This branch is parked here ready to ship the moment we confirm @saeft2003's case is the "legacy returns SUCCESS but robot ignores room list" failure mode rather than the cleaner NOT_APPLICABLE one.
Summary
Adds firmware-version-based clean-payload schema selection so newer Flow firmware (>= v01.07.22.00) skips the legacy schema entirely instead of relying on a NOT_APPLICABLE response that may never come.
Behavior matrix
When to merge
Files touched
Notes