Skip to content

feat(v1): offer SmartPlan and custom modes in the cleaning mode options - #1055

Open
infy1995 wants to merge 6 commits into
Python-roborock:mainfrom
infy1995:claude/v1-cleaning-mode-options-3e8ae4
Open

infy1995 wants to merge 6 commits into
Python-roborock:mainfrom
infy1995:claude/v1-cleaning-mode-options-3e8ae4

Conversation

@infy1995

@infy1995 infy1995 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Part of #738
Fixes #977

Builds on #1025: its commit is included with the original author kept, so #1025 can be closed as superseded.

Summary

SmartPlan and custom mode each set the fan speed, water and mop route together, and each can be chosen only as a cleaning mode. Before this change they were missing from the cleaning mode options on water-slide devices (#977), and they were offered as single values in the fan speed and mop route lists. Picking one of those single values sent one special code on its own and left the robot in a mixed state.

  • cleaning_mode_options offers custom when the model supports custom mode (is_custom_mode_supported). It offers smart_mode (SmartPlan) when the device reports is_smart_clean_mode_set_supported. Neither depends on the water mode list any more, so water-slide devices (e.g. Saros 10R) get both.
  • current_cleaning_mode checks custom codes before SmartPlan codes, so mixed codes are reported as custom. It returns None when the detected mode is not one the device offers, instead of a value that is missing from the options.
  • The fan speed, water mode and mop route option lists (*_options, *_mapping) hold only values a user can select. SmartPlan codes (110 / 209 / 306) and custom codes (106 / 204 / 302) are no longer listed, so a value picked from these lists can never send a special code on its own.
  • fan_speed_name, water_mode_name and mop_route_name still name the current value, including SmartPlan and custom codes, through the new public get_fan_speed_name, get_water_mode_name and get_mop_route_name.
  • The DeviceFeatures model lists for custom mode and soft-clean mode were corrected (see Behavior changes).

The mode conditions, the recognition order and the model lists were compared with the Roborock app plugin (V1, all plugin families). SmartPlan and custom are now offered under the same conditions as in the app.

Behavior changes

  • fan_speed_options / fan_speed_mapping no longer contain smart_mode (110) or custom (106).
  • Code 105 is listed only as gentle, and only on soft-clean models (TanosV, TanosE, Tanos, RubySC, RubySLite, RubySE). Pure-mop models no longer list off; mop-only cleaning is selected with cleaning_mode = mop. Other models no longer list gentle. In Home Assistant, vacuum.set_fan_speed with off, gentle, smart_mode or custom will fail with invalid_fan_speed on those models.
  • water_mode_options / water_mode_mapping and mop_route_options / mop_route_mapping no longer contain smart_mode (209 / 306) or custom (204 / 302). Until Home Assistant handles this, its water and mop-route select entities will show unknown while the robot is in SmartPlan or custom mode.
  • On water-slide devices, water_mode_name now names 209 as smart_mode and 204 as custom (it returned None before). On a soft-clean device that also supports pure mop, fan code 105 is named gentle (it was off before).
  • cleaning_mode_options: custom is no longer offered on RubyPlus, RubySC and RubySE, so set_cleaning_mode("custom") raises RoborockUnsupportedFeature there. smart_mode and custom are now offered on water-slide devices.
  • custom is now also offered on models without a shake or spin mop module: TanosV (S6 MaxV), TanosE, TanosSLite, RubySLite (S5 Max), UltronLite, UltronSE and TalcSC. set_cleaning_mode("custom") now works there, and current_cleaning_mode reports custom for 106 / 204 codes. CustomizeCleanModeTrait (per-room settings) keeps its own gate and is not changed here.
  • current_cleaning_mode: mixed custom and SmartPlan codes (e.g. 106 / 209 / 300) are now custom (they were smart_mode). SmartPlan codes on a device without SmartPlan support, and custom codes on a model without custom mode, now give None.
  • DeviceFeatures.is_soft_clean_mode_supported is now True for RubySC, RubySLite and RubySE. DeviceFeatures.is_custom_mode_supported is now False for RubyPlus, RubySC and RubySE.
  • Home Assistant snapshots will change on the next library bump.

Conflicts with open PRs

I test-merged this branch against every open PR that touches the same files (git merge-tree, on top of current main):

PR Files with a text conflict Kind Who rebases
#1025 (custom and SmartPlan on water-slide devices) roborock/data/v1/v1_clean_modes.py, tests/devices/traits/v1/test_status.py code Nobody: this PR contains #1025's commit, so #1025 can be closed as superseded.
#1024 (CleaningMode.VAC_THEN_MOP) roborock/data/v1/v1_clean_modes.py, tests/devices/__snapshots__/test_v1_device.ambr, tests/devices/traits/v1/test_status.py code + snapshot Whichever PR merges second. Both PRs edit get_cleaning_mode_options / get_current_cleaning_mode, so the rebase has to combine the option list and the recognition order by hand.
#1064 (fan speed, water and mop route setters) roborock/data/v1/v1_clean_modes.py, roborock/devices/traits/v1/status.py, tests/devices/__snapshots__/test_v1_device.ambr, tests/devices/traits/v1/test_status.py, tests/test_supported_features.py code + snapshot #1064 builds on this PR and rebases onto it.
#959 (clean-then-mop status) roborock/devices/traits/v1/status.py, tests/devices/__snapshots__/test_v1_device.ambr, tests/devices/traits/v1/test_status.py code + snapshot Whichever PR merges second regenerates the snapshot.
#1092 (carpet mode) tests/test_supported_features.py test code Whichever PR merges second. #1092 also conflicts with current main in snapshot files, independently of this PR.

#1066 (distinct code for VacuumModes.OFF) has no text conflict with this PR (it conflicts with current main in a file this PR does not touch), but it changes how fan code 105 is named and listed, which this PR also changes. Whichever PR merges second should re-check the 105 handling and its tests.

Edits in the same files but without a text conflict: #1065 (device_features.py, tests/test_supported_features.py), #1087 (test_v1_device.ambr), #1045 (docs/V1_DEVICE_FEATURES.md). The other open PRs touch none of this PR's files.

Testing

  • pytest: full suite passes (3313 passed), run with two hash seeds. Snapshots were updated only for the changed option lists and mappings.
  • pre-commit run --all-files (ruff, mypy, codespell) passes.

@infy1995 infy1995 mentioned this pull request Nov 16, 2026
9 tasks
@infy1995 infy1995 changed the title feat(v1): offer SmartPlan and custom cleaning modes like the app feat(v1): offer SmartPlan and custom modes in the cleaning mode options Nov 17, 2026
@Lash-L Lash-L added Feature New feature V1 V1 platform labels Nov 18, 2026
@infy1995 infy1995 closed this Nov 18, 2026
@infy1995
infy1995 deleted the claude/v1-cleaning-mode-options-3e8ae4 branch November 18, 2026 20:00
@infy1995
infy1995 restored the claude/v1-cleaning-mode-options-3e8ae4 branch November 18, 2026 20:00
@infy1995 infy1995 reopened this Nov 18, 2026
@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch from b6c87cc to af53ca3 Compare November 21, 2026 09:34

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

Automated code review by Gemini 4 Neon in Antigravity using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Verdict

Clean — ready to approve. No blocking issues or defects survived adversarial self-check, and all CI checks pass on af53ca3.


Review Summary by Architectural Layer

  • Priority 1 — Public Trait APIs & Consumer Contracts (roborock/devices/traits/v1/status.py, roborock/data/v1/v1_clean_modes.py, roborock/device_features.py):

    • Clean separation between user-selectable write options (*_options / *_mapping) and read-only telemetry naming (*_name via the new strongly typed get_fan_speed_name, get_water_mode_name, and get_mop_route_name helpers).
    • get_cleaning_mode_options no longer depends on get_water_modes, fixing missing CUSTOM and SMART_MODE options on water-slide devices (e.g., Saros 10R) while keeping is_customized_clean_supported alongside is_custom_mode_supported so electronic-mop models do not gain unsupported CUSTOM.
    • No Any or TypedDict introduced on public boundaries; intentional breaking behavior changes for downstream consumers (removing non-selectable special codes and non-soft-clean 105 from *_options/*_mapping) are clearly documented in StatusTrait and the PR description.
  • Priority 2 — Data Lifecycle, State & Capability Gating:

    • All new helpers (get_fan_speed_name, get_water_mode_name, get_mop_route_name, _classify_cleaning_mode) are pure value-returning transformations with linear control flow.
    • Proper distinction between capability gating and telemetry decoding: selectable options and get_current_cleaning_mode (which backs the high-level select contract current_cleaning_mode in cleaning_mode_options) are gated by DeviceFeatures, whereas get_*_name decodes SmartPlan (110/209/306) and custom (106/204/302) wire codes unconditionally.
  • Priority 3 — Wire Protocols, Codecs & Resilient Enums:

    • No wire protocol or codec changes; unknown codes resolve cleanly to None without raising ValueError.
  • Tests & Fixtures (tests/devices/traits/v1/test_status.py, tests/test_supported_features.py, snapshots):

    • Colocated in the matching mirror test suites using @pytest.mark.parametrize, asserting public trait and helper behavior with minimal, accurate snapshot updates.

Roborock App (RR_API) Verification

Cross-checked against nonhermes/com.roborock.tanos (402.js, 383.js, 1850.js, 1870.js) and Hermes bundles (com.roborock.tanos, com.roborock.rubys, Saros 10R, Saros 20):

  • is_soft_clean_mode_supported: Matches isSoftCleanModeSupportedInMain exactly (TanosV, TanosE, Tanos, RubySC, RubySLite, RubySE).
  • is_custom_mode_supported: Matches isCustomModeSupported exactly (!(Tanos || RubyPlus || RubySC || RubySE)).
  • Selectable option lists: CleanModes / getCleanModeItems exclude 106 and 110 and only include 105 (Gentle) when isSoftCleanModeSupportedInMain() is true; MopWaterOrStrengths excludes 204/209; MopMethods / getCleanRouteItems excludes 302/306.
  • SmartPlan gating & mode priority: shouldShowSmartTab is gated on NewFeatureStrBit.SmartCleanModeSet (bit 55) independently of water-slide mode, and getCleanModeType checks isModeCustomized before isSmartModeSet — matching get_cleaning_mode_options and _classify_cleaning_mode.

@Lash-L Lash-L added /review run Code review skill (/review) has been run Passed /review Passed the /review skill check labels Nov 21, 2026
@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch 2 times, most recently from b891345 to 5a3e97c Compare November 23, 2026 08:46
@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch from 5a3e97c to 4e06396 Compare November 23, 2026 13:34

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

Automated code review by Claude Opus 5.5 in Claude Code using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Follow-Up Review (4e06396, delta from af53ca3)

Verdict: Passes /review with nits.

What changed since af53ca3: the branch was rebased onto current main (cfa413e) and #1025's commit was added at the bottom (336e8be, a byte-identical patch to #1025's 0e7b014, with the original author kept). ccdc202 then removes #1025's is_water_slide or ... in supported_water_modes gating and gates CUSTOM / SMART_MODE directly on the feature flags. That is the simplification asked for in the inline question on #1025. The other five commits are unchanged from the earlier review (git range-diff shows = for each). The previous automated review had no blocking findings, so there is nothing to carry forward.

#1025: this PR now fully contains and supersedes it. Once this merges, #1025 can be closed as superseded. It also no longer needs its own fix, because the gating it adds is replaced here.

Merge state: merges cleanly with main. #1064 contains this head and is stacked on it. #1054 is independent and conflicts only in tests/__snapshots__/test_supported_features.ambr (regenerate in whichever PR merges second), as the PR body says.


Priority 1: Public Trait APIs & Consumer Contracts

No findings. The breaking changes to *_options / *_mapping (no 106/110/204/209/302/306, and 105 only as gentle on soft-clean models) are intentional and listed in the PR body. *_name still names the special codes through get_fan_speed_name / get_water_mode_name / get_mop_route_name.

Priority 2: Lifecycle, State & Capability Gating

No findings. get_current_cleaning_mode returning None for a mode outside get_cleaning_mode_options keeps the select contract (current in options).

Priority 3: Wire Protocols & Enums

No changes.

Roborock app (RR_API) check

  • is_soft_clean_mode_supported = TanosV, TanosE, Tanos, RubySC, RubySLite, RubySE: confirmed (nonhermes/com.roborock.tanos/index.android.bundle:408 isSoftCleanModeSupportedInMain; same list in hermes/com.roborock.tanos/output/module_443.js and hermes/no_package/Saros 10Rcomplete/output/module_443.js).
  • is_custom_mode_supported = not (Tanos, RubyPlus, RubySC, RubySE): confirmed (index.android.bundle:408 isCustomModeSupported; Saros 10Rcomplete/output/module_443.js:228-276).
  • 105 is offered as Gentle only on soft-clean models: confirmed (index.android.bundle:1876 getCleanModeItems slices off index 0 unless isSoftCleanModeSupportedInMain()).
  • Custom is recognised before SmartPlan: confirmed (index.android.bundle:1876 getCleanModeType checks isModeCustomized before isSmartModeSet).
  • The SmartPlan tab depends only on NewFeatureStrBit.SmartCleanModeSet and not on the water mode list: confirmed (index.android.bundle:389 shouldShowSmartTab). The custom tab is isCustomModeSupported() && shouldShowCustomSwitch. Keeping is_customized_clean_supported as the stand-in for shouldShowCustomSwitch is a conservative choice, and the code comment marks it as unverified.

Tests & PR hygiene

  • Nit: ccdc202 deletes the hardware-readback tests that #1025 added (test_current_cleaning_mode_water_slide_special_modes and test_set_cleaning_mode_water_slide_special_modes in tests/devices/traits/v1/test_status.py). The new tests cover SmartPlan on a water-slide device (test_saros_10r_smartplan_is_listed). Nothing covers these two cases any more:

    • Custom classification on water-slide devices, using the real readbacks (106, 204, 300) from a296 and (106, 204, 302) from a328 (#977).
    • The SET_CLEAN_MOTOR_MODE payload for CUSTOM / SMART_MODE on a water-slide device.

    Suggested fix: keep those two parametrized tests from 336e8be unchanged. They pass against the new gating, because the helper sets is_customized_clean_supported=True and is_custom_mode_supported defaults to True on A27. This keeps the regression coverage for #977 and credits the contributor's device data.

  • Local run at 4e06396: pytest 2845 passed, 46 xfailed; ruff check and ruff format --check are clean. mypy shows one error in tests/map/test_b01_q10_render.py:502, a file this PR does not touch (environment-specific; CI lint is green). All CI checks pass on 4e06396.


This is an automated review and can be incorrect, so please reply if any finding looks wrong.

@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch from 4e06396 to f46683c Compare November 25, 2026 08:42
@infy1995

Copy link
Copy Markdown
Contributor Author

Thanks, you're right. Both parametrized tests from #1025 (test_current_cleaning_mode_water_slide_special_modes and test_set_cleaning_mode_water_slide_special_modes) are back, unchanged. They were lost by mistake when I resolved a conflict while building this branch on #1025's commit, not removed on purpose. All five cases pass with the new gating.

The restore is folded into feat(v1): keep SmartPlan and custom codes out of fan, water and mop route options (f81e52b), so no commit drops them any more. The branch is also rebased onto current main (7.33.0). Compared with the previous head merged with main, the only difference is those 57 test lines. pytest (2875 passed, two hash seeds) and pre-commit pass.

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

Automated code review by Claude Opus 5.5 in Claude Code using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Follow-Up Review (f46683c, delta from 4e06396)

Verdict: Passes /review.

What changed since 4e06396: the branch was rebased from 93f0d98 onto cfa413e (v7.33.0). Apart from that, there is one content change. In f81e52b (formerly ccdc202), the two parametrized tests from #1025 are no longer deleted. git range-diff shows = for the other five commits. In 1ca961e only the diff context moved, because the restored tests now sit above it.

Earlier findings

  • Nit: the hardware-readback tests from #1025 were deleted. Fixed. test_current_cleaning_mode_water_slide_special_modes (tests/devices/traits/v1/test_status.py:858-885) and test_set_cleaning_mode_water_slide_special_modes (:888-912) are back. They are identical to #1025's 0e7b014, including the a296 readbacks (106, 204, 300) / (110, 209, 306) and the a328 readback (106, 204, 302) from #977. They pass against the new gating. This restores the regression coverage for custom classification and for the SET_CLEAN_MOTOR_MODE payload on water-slide devices.

New in this delta

No new production code. No new findings.

Priority 1: Public Trait APIs & Consumer Contracts

No findings. The breaking changes to *_options / *_mapping are unchanged from the earlier review and still listed in the PR body:

  • 106/110/204/209/302/306 are no longer included.
  • 105 appears only as gentle, and only on soft-clean models.
  • On pure-mop models, OFF is no longer a fan option.

Priority 2: Lifecycle, State & Capability Gating

No findings.

  • get_current_cleaning_mode still returns None for any mode that is not in get_cleaning_mode_options (roborock/data/v1/v1_clean_modes.py:391-393).
  • Custom is still checked before SmartPlan (:404-407).

Priority 3: Wire Protocols & Enums

No changes. #1050 (now on main) refers to VacuumModes.CUSTOMIZED / SMART_MODE, WaterModes.CUSTOMIZED / SMART_MODE and CleanRoutes.CUSTOMIZED / SMART_MODE in customize_clean_mode.py. All of these enum members still exist on this branch. Only their inclusion in the option lists changed.

Roborock app check (RR_API and the a87's own plugin)

  • is_custom_mode_supported is !(Tanos || RubyPlus || RubySC || RubySE) in the Qrevo MaxV 2's own plugin as well (prtest/a87_plugin/output.js around line 240892). This matches roborock/device_features.py:551-559. The earlier RR_API citations (nonhermes/com.roborock.tanos/index.android.bundle:408, :1876, :389) are unchanged.

  • Custom tab. In the a87 plugin, shouldShowCustomSwitch is a page prop:

    • true on the home cleaning-mode page.
    • false on the exact-edit page.

    So on the main page the custom tab depends only on isCustomModeSupported. The extra is_customized_clean_supported requirement is a conservative choice, and the code comment explains why. This is not a defect.

Merge state and related PRs

  • main (2a051f2, which includes #1050 and #1091): git merge-tree is clean. I also ran the full suite on the merged tree: 2896 passed, 46 xfailed.
  • #1064: contains f46683c and is still stacked on it.
  • #1054: conflicts only in tests/__snapshots__/test_supported_features.ambr, as before. Regenerate it in whichever PR merges second.
  • #1025: now conflicts with this branch (v1_clean_modes.py, test_status.py). That is expected, because this PR carries #1025's commit with the original author and replaces its gating. Close #1025 as superseded once this merges.

Live test on a Qrevo MaxV 2

Model a87 (PearlPlus), firmware 02.34.04, US, at f46683c. Read-only.

Property Value
cleaning_mode_options [vacuum, vac_and_mop, mop, custom, smart_mode]
Fan options [quiet, balanced, turbo, max, max_plus]
Mop route options [standard, deep, deep_plus, fast]
Water options [off, low, medium, high, custom_water_flow]
Current mode vac_and_mop
  • Option lists: none of them include a SmartPlan or custom code.
  • Cleaning modes: the five options match the a87 plugin:
    • Custom: PearlPlus is not in the isCustomModeSupported blacklist.
    • SmartPlan: the device reports SmartCleanModeSet (bit 55).
    • Mop: the device supports pure mop.
  • Status trait: otherwise identical to the 2026-11-22 snapshot.
  • Not exercised: switching into SmartPlan or Custom on the device.

Local results

  • pytest at f46683c: 2875 passed, 46 xfailed, 168 snapshots passed.
  • pytest on the merge with current main: 2896 passed, 46 xfailed.
  • ruff check and ruff format --check are clean.
  • CI (gh pr checks): every check passes on f46683c: lint, test 3.11/3.14, test-mqtt 3.11/3.14, Build Package, Lint Commit Messages, Test Semantic Release. release was skipped.

This is an automated review and can be incorrect, so please reply if any finding looks wrong.

Lash-L
Lash-L previously approved these changes Nov 25, 2026

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

Thanks for going back and forth with the automated review. Tested on my device and just did a manual review and it looks good to me, TY!

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

Automated code review by Claude Opus 5.5 in Claude Code using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Correction to the previous review (f46683c)

Verdict: Does not pass /review. The earlier review on this head called the extra is_customized_clean_supported gate on CUSTOM "only a conservative choice". A closer trace of the app shows it drops Custom on models where the app shows it, so it is a parity bug.

Blocking: Custom option is gated on a flag the app never reads

roborock/data/v1/v1_clean_modes.py, get_cleaning_mode_options:

if features.is_custom_mode_supported and features.is_customized_clean_supported:
    options.append(CleaningMode.CUSTOM)

What the app does (tanos plugin output.js; the a87 plugin is identical at 263908-263930):

  • The Custom tab is shouldShowCustomTab = isCustomModeSupported() && props.shouldShowCustomSwitch (486913-486935), passed to the tab builder at 485625 (320958-321102, no further gate).
  • shouldShowCustomSwitch is not a capability check. It is a page prop with defaultProps true (489876). The home-page ModeSettingPanels don't override it (917940, 1063544); it is only set to false inside the per-room, scene, timer and map-edit exact editors (918157, 1030684, 1273131, 1089635). On the main panel the app's gate is just isCustomModeSupported.
  • is_customized_clean_supported is the product-table shake/spin-module flag (device_features.py:603, OR'd with roller mop at :700). Nothing in the app's custom-tab path reads it.

Effect: electronic-water-tank models that are not in the custom blacklist lose CUSTOM. Examples: TanosV (S6 MaxV), RubySLite (S5 Max), TanosE, TanosSLite, UltronLite, UltronSE, TalcSC. On these, cleaning_mode_options has no Custom, and current_cleaning_mode returns None when the robot is on 106/204/302, although the app shows the Custom tab.

Fix: gate on features.is_custom_mode_supported alone (the is_support_water_mode early return already covers models without a mop; the only no-mop models, Tanos, RubyPlus, RubySC and RubySE, are already in the custom blacklist). Remove the "stays required until … verified" comment, and update the tests and snapshots that expect no CUSTOM on electronic-tank models.

Optional follow-up (not verified)

CustomizeCleanModeTrait is also gated on is_customized_clean_supported, so after the fix electronic-tank models would offer Custom but no per-room trait. Whether that gate should widen needs its own check of the app's canExactCustomMode (ExactCustomMode bit); it can be a separate PR.

Re-confirmed, no change needed

  • Fan list: the app's CleanModes() is [105, 101, 102, 103, 104] (+108 for Max+) (317529-317676); getCleanModeItems keeps 105 only when called from the home page and isSoftCleanModeSupportedInMain (319787-319835, single call site 481931 passes isInHomePage). The library uses get_clean_modes only for the global fan setting, so GENTLE behind is_soft_clean_mode_supported matches. 106/110 are never in the list.
  • Water and route option lists never include 204/209 or 302/306.
  • isCustomModeSupported = not (Tanos, RubyPlus, RubySC, RubySE) (200609-200670) and isSoftCleanModeSupportedInMain = TanosV, TanosE, Tanos, RubySC, RubySLite, RubySE (200515-200605) both match device_features.py.
  • getCleanModeType checks custom before smart (319836-319891), matching _classify_cleaning_mode.

Since #1064 is stacked on this PR, it will need a rebase after the fix.


This is an automated review and can be incorrect, so please reply if any finding looks wrong.

@Lash-L Lash-L removed the Passed /review Passed the /review skill check label Nov 25, 2026
@Lash-L

Lash-L commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

ok jk sorry, found one thing that stood out to me during another review and had claude confirm it. Take a look!

@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch from f46683c to 9377e05 Compare November 25, 2026 20:35
@infy1995

Copy link
Copy Markdown
Contributor Author

Confirmed, thanks. The custom tab depends only on the model supporting custom mode, so CUSTOM is now gated on is_custom_mode_supported alone. On main and on the previous head, TanosV, TanosE, TanosSLite, RubySLite, UltronLite, UltronSE and TalcSC did not list it; on the previous head current_cleaning_mode also returned None for 106 / 204 there, which was worse than main.

The fix is folded into feat(v1): offer SmartPlan and custom cleaning modes from device flags (921c6ef), with a test that failed on the old gate. The comment about the unverified condition is gone, and no snapshots changed. pytest (2875 passed, two hash seeds) and pre-commit pass.

I left CustomizeCleanModeTrait as it is. Whether its gate should widen needs its own check, so it fits better in a separate PR.

@github-actions github-actions Bot added documentation Improvements or additions to documentation Data model changes Changes to data models, device info, or feature mappings labels Nov 25, 2026
@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch from 9377e05 to 905a2e4 Compare November 25, 2026 21:08

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

Automated code review by Claude Opus 5.5 in Claude Code using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).

Follow-Up Review (9377e05, delta from f46683c)

Verdict: Passes /review.

Earlier blocking finding

  1. Custom gated on a flag the app never reads: Fixed. get_cleaning_mode_options now offers CUSTOM on features.is_custom_mode_supported alone (v1_clean_modes.py:273), which matches the app's shouldShowCustomTab on the main panel (isCustomModeSupported() && shouldShowCustomSwitch, where the prop defaults to true). The "stays required until verified" comment is gone.
    • test_cleaning_mode_options_custom_needs_customized_clean is replaced by test_custom_mode_does_not_need_customized_clean, which checks that a model without a shake or spin module both lists CUSTOM and classifies 106/204/302 as CUSTOM.
    • git range-diff f81e52b..f46683c f81e52b..9377e05: only 921c6ef changed (the gate, the test and the commit message). 189fd20 and 9377e05 are identical to the previous snapshot and docs commits, so no snapshots changed, as the author said.

Left for a separate PR (agreed)

  • CustomizeCleanModeTrait keeps its is_customized_clean_supported gate. Whether it should widen depends on the app's canExactCustomMode (ExactCustomMode bit), which needs its own check.

Live test on a Qrevo MaxV 2 (a87, fw 02.34.04, US) at 9377e05

  • Read-only snapshot: cleaning_mode_options = vacuum, vac_and_mop, mop, custom, smart_mode; current mode vac_and_mop. Identical to f46683c, as expected for a model with a shake module.

Local results at 9377e05

  • pytest: 2875 passed, 46 xfailed.
  • ruff check and ruff format --check: clean.
  • CI: green on every job (release skipped).
  • Merges cleanly with current main.

Note for #1064

#1064 is still built on f46683c and now conflicts with this head. It needs a rebase onto 9377e05 before it can merge.


This is an automated review and can be incorrect, so please reply if any finding looks wrong.

@Lash-L Lash-L added the Passed /review Passed the /review skill check label Nov 25, 2026
paulleonartcalvo and others added 6 commits November 26, 2026 18:05
…ices

Water-slide devices report flow as slider positions, so get_water_modes()
has no CUSTOMIZED (204) or SMART_MODE (209) entry for them and
get_cleaning_mode_options() dropped CUSTOM and SMART_MODE even when the
feature flags are set. get_current_cleaning_mode() still classifies those
states, so consumers such as Home Assistant showed an unknown cleaning
mode whenever the device was in custom or SmartPlan mode.

Gate both options on the feature flags alone for water-slide devices.
Verified on a Qrevo Edge 3 Pro (roborock.vacuum.a296): writing
106/204/302 and 110/209/306 with set_clean_motor_mode is accepted and
read back as 106/204/300 and 110/209/306.

Fixes Python-roborock#977

Co-Authored-By: Claude Opus 5.5 <[email protected]>
RubyPlus, RubySC and RubySE do not support the custom cleaning mode, and
RubySC, RubySLite and RubySE support the soft clean (gentle) fan mode.
The model lists were compared with the app plugin.
SmartPlan and custom no longer depend on the water mode list, which never
contains their codes on water-slide devices, so those devices now get both
modes. Custom depends on the model supporting it and no longer on a shake or
spin mop module, so electronic water tank models such as the S6 MaxV get it
too. Custom codes are checked before SmartPlan codes, and a recognized mode the
device does not offer is reported as None.
Also cover code 105 on pure-mop soft-clean devices and SmartPlan codes without SmartPlan support.
@infy1995
infy1995 force-pushed the claude/v1-cleaning-mode-options-3e8ae4 branch from 905a2e4 to 2019adf Compare November 26, 2026 17:08

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Data model changes Changes to data models, device info, or feature mappings documentation Improvements or additions to documentation Feature New feature Passed /review Passed the /review skill check /review run Code review skill (/review) has been run V1 V1 platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Water-slide device reports custom mode but capability-derived options exclude it (Qrevo Edge 2 Flow)

3 participants