Skip to content

fix: map water slide positions to the app's flow ranges - #975

Merged
Lash-L merged 1 commit into
Python-roborock:mainfrom
frenck:frenck/water-slide-ranges
Oct 7, 2026
Merged

Lash-L merged 1 commit into
Python-roborock:mainfrom
frenck:frenck/water-slide-ranges

Conversation

@frenck

@frenck frenck commented Oct 7, 2026

Copy link
Copy Markdown

Water slide devices (for example the Saros 10R) report the raw slider position as 220 + position (1 to 30), but water_mode_name only knew seven exact codes. Any position set from the app that is not one of those came back as None, 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:

  • uses the app-verified representative codes: 221 slight, 225 low, 230 gentle, 235 medium, 240 moderate, 245 high, 250 extreme
  • resolves reported slide codes to the app's named ranges (1-3, 4-7, 8-12, 13-17, 18-22, 23-27, 28-30) via get_water_slide_mode_name(), used by StatusTrait.water_mode_name on water slide devices

Non-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.

Copilot AI balanced review requested due to automatic review settings October 7, 2026 09:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
allenporter requested a review from Lash-L October 7, 2026 13:07

@allenporter allenporter left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me, will have @Lash-L review/merge.

Yes, a new release will be automatically created on merge.

@Lash-L Lash-L left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you @frenck!

@Lash-L
Lash-L merged commit 5420f8d into Python-roborock:main Oct 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Water Flow settings on Saros 10R

4 participants