Skip to content

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

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

infy1995 wants to merge 5 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

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) and the device reports is_customized_clean_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). The cleaning mode options now match what the app shows for each model.

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.
  • 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 (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 Whichever PR merges second. This PR already includes #1025's fix: custom and smart_mode on water-slide devices depend only on the device flags. If #1025 lands first, this PR keeps its own get_cleaning_mode_options and adapts #1025's parametrized test_cleaning_mode_options_water_slide_device to the is_custom_mode_supported flag.
#1024 (CleaningMode.VAC_THEN_MOP) roborock/data/v1/v1_clean_modes.py, tests/devices/__snapshots__/test_v1_device.ambr 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.
#959 (clean-then-mop status) tests/devices/__snapshots__/test_v1_device.ambr snapshot only Whichever PR merges second regenerates the snapshot.
#1054 (V1 feature flag bits) tests/__snapshots__/test_supported_features.ambr snapshot only Whichever PR merges second regenerates the snapshot. Both PRs also edit roborock/device_features.py and docs/V1_DEVICE_FEATURES.md, without a text conflict.

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

Testing

  • pytest: full suite passes (2391 passed). 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

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

Feature New feature 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)

2 participants