Repository navigation
fix: map water slide positions to the app's flow ranges - #975
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused implementation matches the documented app ranges and includes comprehensive regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Maps V1 water-slide status codes to the Roborock app’s verified intensity ranges.
Changes:
- Corrects representative water-flow codes and adds Gentle.
- Resolves all slider positions from 221–250.
- Adds boundary and invalid-code coverage.
| File | Description |
|---|---|
roborock/data/v1/v1_clean_modes.py |
Defines corrected modes and range resolution. |
roborock/devices/traits/v1/status.py |
Applies range resolution to slide-device status. |
tests/devices/traits/v1/test_status.py |
Tests mappings, ranges, and invalid values. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
allenporter
approved these changes
Oct 7, 2026
allenporter
left a comment
Contributor
There was a problem hiding this comment.
Makes sense to me, will have @Lash-L review/merge.
Yes, a new release will be automatically created on merge.
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.
Water slide devices (for example the Saros 10R) report the raw slider position as
220 + position(1 to 30), butwater_mode_nameonly knew seven exact codes. Any position set from the app that is not one of those came back asNone, so consumers show the mop intensity as unknown.The seven representative codes were also off compared to the app. Based on the app traffic captures and direct testing in #801, 245 is High (not Moderate), 248 falls in the Extreme range (not High), and Gentle (230) was missing. Selecting "moderate" set High, and "high" set Extreme.
This change:
get_water_slide_mode_name(), used byStatusTrait.water_mode_nameon water slide devicesNon-slide devices are unchanged. This does not touch the cleaning-mode command and classification paths covered by #961.
Fixes #801
Related downstream issue: home-assistant/core#153638
After merging, could a new release be cut? That lets us bump python-roborock in Home Assistant and fix the issue for users.