narwal: Add Flow dock light#61
Open
Sean-StarLabs wants to merge 4 commits into
Open
Conversation
…CleanParam (sjmotew#25, sjmotew#37) Room cleans were sent to clean/plan/start, but on Flow firmware that is StartWithPlan{planId, mapId} — it starts a saved plan by id and ignores any room payload, so the robot undocked and wandered instead of cleaning the selection. Switch start_rooms() to clean/start_clean (StartClean → CleanTask). Track the active map id (MapData.map_id, get_map field 2.1), which the CleanTask requires. clean/start_clean only works docked; from STANDBY the robot returns a new code 4 (CommandResult.NOT_READY) — retry briefly while docked. Build the CleanParam from named parameters: start_rooms() takes work_mode/fan/water/mop_strength/passes with defaults at the call site (vacuum-and-mop, standard suction/water/mop, single pass). Names and enums match the app's CleanTask proto: WorkMode (= robot_work_mode_*, whose value is CleanTask.taskType), corrected FanLevel/MopHumidity, added MopStrengthLevel; fan_speed labels use the app's user-visible suction names (quiet/standard/strong/super powerful/ultra powerful). Pre-rename fan_speed values (normal/max) remain accepted for back-compat. Validated live on a Flow 2: room clean returns SUCCESS and the robot cleans the selected rooms (confirmed via clean/current_clean_task/get). Both client copies synced. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit 88313a48c9b3f29336c99659ed477e835336d845)
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
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.
What
Expose supported Flow dock ambient lighting as a Home Assistant light with the available effects.
Why
This keeps the Flow 2 behaviour local, explicit, and reviewable without mixing unrelated changes.
Stack
Part 4 of 8.
Depends on #60. The diff includes earlier stack commits until those land upstream.
Validation
300 passed