Uh oh!
There was an error while loading. Please reload this page.
fix: align mop routes with device capabilities - #918
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 8 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts how V1 “clean route” / mop-route capability is detected and surfaced, aiming to close a support gap by incorporating the runtime shake-mop feature bit into feature detection and the route/payload logic.
Changes:
- Extends
DeviceFeaturesto treatis_clean_route_setting_supportedas inclusive of the runtimeis_shake_mop_set_supportedflag. - Updates V1 clean-route option derivation and cleaning-mode RPC payload construction to key off the shake-mop support flag.
- Adds/updates tests and snapshots to validate new capability detection and mop-route option behavior.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_supported_features.py | Adds assertions and new parametrized tests for shake-mop bit and clean-route setting support. |
| tests/devices/traits/v1/test_status.py | Updates status-trait tests to reflect mop-route options behavior based on shake-mop support. |
| tests/devices/snapshots/test_v1_device.ambr | Updates snapshots for status trait output after mop-route gating changes. |
| tests/snapshots/test_supported_features.ambr | Updates snapshots for feature-flag support output. |
| roborock/device_features.py | ORs runtime shake-mop support into clean-route setting support. |
| roborock/data/v1/v1_clean_modes.py | Gates mop-route options and mop_mode payload inclusion based on shake-mop support. |
Suppressed comments (1)
roborock/data/v1/v1_clean_modes.py:289
get_cleaning_mode_parameters()switched fromis_clean_route_setting_supportedtois_shake_mop_set_supportedfor deciding whether to includemop_modein the RPC payload. This can omitmop_modefor devices where clean-route support is inferred from the model’s shake/spin capability (or whennew_feature_infois unavailable), which risks sending an incomplete payload for mop-capable devices.
fan_power, water_box_mode, mop_mode = _get_clean_motor_mode_params(cleaning_mode, features)
params: dict[str, int] = {"fan_power": fan_power.code, "water_box_mode": water_box_mode.code}
if features.is_shake_mop_set_supported:
params["mop_mode"] = mop_mode.code
return [params]
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
135
to
+140
| def get_clean_routes(features: DeviceFeatures, region: str) -> list[CleanRoutes]: | ||
| """The routes that the vacuum will take while mopping""" | ||
| # Mop routes are only configurable when the device advertises support for | ||
| # setting the shake-mop route. | ||
| if not features.is_shake_mop_set_supported: | ||
| return [] |
Comment on lines
+647
to
+650
| # Clean-route setting support is provided by either the runtime | ||
| # shake-mop flag or the model's shake/spin mop capability. | ||
| kwargs["is_clean_route_setting_supported"] |= kwargs["is_shake_mop_set_supported"] | ||
Lash-Lforce-pushed
the
fix-s6-maxv-mop-route-clean
branch
from
August 13, 2026 14:20
c3958a2 to
1f4b45cCompareLash-Lforce-pushed
the
fix-s6-maxv-mop-route-clean
branch
from
August 13, 2026 14:38
1f4b45c to
8b057e5Compareallenporter
approved these changes
Aug 15, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Summary
mop_modepayloads on the combined clean-route capability used by the Roborock app (runtime shake, model shake/spin, or roller mop)deep_plusfor both protocol variantsRR_API validation
Checked all 24 captured app bundles and compared the route builder in all 11 route-capable V1 bundles. The 10 newer bundles consistently gate 301 on the inverse of clean-efficiency support. Tanos combines the runtime shake bit, model
Mop_ShakeModule/Mop_SpinModule, and roller-mop support; this preserves valid routes for spin-mop devices such as PEARLSLITE when the runtime shake bit is false.Validated fixture and synthetic matrices for S6 MaxV, S7, PEARLSLITE, TOPAZSV, Saros 20, US/CN regions, roller bit boundaries, and every branch of the 303/305 selection.
Tests
uv run pytest tests/devices/traits/v1/test_status.py tests/test_supported_features.py -q(111 passed)select.selectfixture modules excluded locally and left to Linux CI)uv run ruff check .uv run ruff format --check .uv buildAddresses the route-selection problem discussed in home-assistant/core#178659 (comment) and preserves the S6 MaxV fix from home-assistant/core#177324.