Repository navigation
Conversation
infy1995
marked this pull request as draft
November 13, 2026 20:13
The Roborock app shows the dock's dust collection page only for a collecting dock on a product that supports it (isCollectDustModeSupported, not Pearl), and loads the mode only with isDustCollectionSettingSupported. - DustCollectionModeTrait now requires is_collectable, is_collect_dust_mode_supported and is_dust_collection_setting_supported. - DustCollectionFrequencyTrait now requires is_collectable and is_collect_dust_mode_supported. Both traits are created explicitly in discover_features, because _is_supported cannot combine dock and device feature checks. Behaviour change: on Pearl products (e.g. Q Revo) and on devices without the dust collection setting feature, dust_collection_mode is now None.
infy1995
force-pushed
the
feat/v1-mop-wash-settings
branch
from
November 15, 2026 01:40
4662475 to
67f528d
Compare
Lash-L
reviewed
Nov 18, 2026
Lash-L
left a comment
Collaborator
There was a problem hiding this comment.
Automated code review by Gemini 4 Hydrogen in Antigravity using our /review (/code-review) skill (.agents/skills/code-review/SKILL.md / AGENTS.md).
Stacking note: This branch is stacked on #1036 (
1b2efd87,3dfce1d5,4897723f); this review covers only PR #1045's own commits (11661023,93e2e3ae,42957e16,67f528d9).
Summary
No issues found. All new traits, enums, option lists, command payloads, and feature/dock gating match the Roborock app's V1 behavior and follow repository conventions.
- Priority 1 (Public Trait APIs & Consumer Contracts):
WashWaterTemperature,CleaningFluidDelivery, andSmartWashParamssubclassRoborockBaseas@dataclassmodels with concrete types and noAnyorTypedDict.WashWaterTemperatureTraitis gated ondock_features.is_washable,device_features.is_hot_wash_towel_supported, andis_wash_water_temperature_offered(hiding it onPEARLELITEunlessdock_type == shell_2e_lite_dock). Option ordering and gating (room_temperature,warmwhen neitheris_high_tmp_water_supportednoris_steam_wash_supported,hot,steamwhenis_steam_wash_supported) match the app.CleaningFluidTraitis gated ondock_features.is_clean_fluid_auto_delivery_supportedand exposesoff(0),standard(1), andlarge(3).SmartWashParamsTraitis gated ondock_features.is_washable, exposesby_time(0),by_room(1), andnew_smart(2, gated onis_back_wash_new_smart_supported), andwash_interval_optionsreturns[600, 900, 1200, 1500]s (or600..3000s in300s steps forTopazS,TopazSV,TopazSPlus,TopazSC,TopazSPower, andUltronSPlus).WashTowelModeTrait.set_wash_towel_modevalidates againstwash_towel_mode_options, andself_clean_traysendsapp_amethyst_self_checkgated ondock_features.is_clean_carousel_self_clean_supported.
- Priority 2 (Data Lifecycle & State Management):
- Pure option/gating helpers (
get_wash_water_temperatures,is_wash_water_temperature_offered,get_wash_interval_options) return values without side effects. - Setters validate supported options before sending and perform optimistic state updates only after
send_commandsucceeds.
- Pure option/gating helpers (
- Priority 3 (Wire Protocols & Resilient Enums):
RoborockDockWashWaterTemperatureCode,RoborockDockCleaningFluidCode, andRoborockDockSmartWashModeCodeinherit fromRoborockEnumwithunknown = -1.- Wire payloads match the app (
set_wash_water_temperature{"values": n}vs read{"wash_water_temperature": n},set_auto_delivery_cleaning_fluid{"status": n},set_smart_wash_params{"smart_wash": n, "wash_interval": s},app_amethyst_self_check{}).
- Tests & Checks:
uv run --python 3.12 pytest tests/devices/traits/v1/test_wash_water_temperature.py tests/devices/traits/v1/test_cleaning_fluid.py tests/devices/traits/v1/test_smart_wash_params.py tests/devices/traits/v1/test_wash_towel_mode.py tests/conformance/-> 672 passed, 53 xfailed.uv run --python 3.12 ruff check roborock testspassed;mypyreported zero errors in PR #1045's files.
Every collecting dock has an auto-empty setting and manual dust collection, but only devices with new feature string bit 53 choose an auto-empty frequency; the others only switch auto-empty on or off. - Rename DustCollectionFrequencyTrait to DustCollectionTrait (PropertiesApi.dust_collection), matching the B01 Q10 trait, since it now covers more than the frequency. - Gate it only on is_collectable. frequency_options is off/balanced/high with is_auto_collection_2_supported and off/balanced (on/off) without it. - Move start_dust_collection / stop_dust_collection from DustCollectionModeTrait to DustCollectionTrait, so Pearl and docks without the dust collection setting keep manual dust collection. - Update V1_DEVICE_FEATURES.md and V1_API_COMMANDS.md.
infy1995
force-pushed
the
feat/v1-mop-wash-settings
branch
from
November 18, 2026 08:02
67f528d to
b8b4a17
Compare
This branch has not been deployed
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.
Part of the "Dock controls" item in #738: V1 dock mop wash settings and the wash tray self-clean, so consumers can set how often and how the dock washes the mops and start or stop a tray self-clean.
Depends on #1036 (this branch is based on it; the first five commits belong to #1036). I will rebase onto
mainonce #1036 is merged.Changes
WashWaterTemperatureTrait(PropertiesApi.wash_water_temperature)get_wash_water_temperature;set_wash_water_temperature(temperature)sendsset_wash_water_temperaturewith{"values": <code>}. The device answers reads withwash_water_temperature, but rejects that key on writes (-10007 invalid params).RoborockDockWashWaterTemperatureCode: room_temperature 0, warm 1, hot 2, steam 3, pet_steam 4.wash_water_temperature_optionsfrom the pureget_wash_water_temperatures(dock_features): room temperature and hot always, warm only on docks with neither high temperature water nor steam, steam only on steam docks, pet steam never.is_hot_wash_towel_supported, so docks that cannot heat wash water get no temperature control. The PearlE Pro (PEARLELITE, a169/a170) can heat wash water only with a Shell2E Lite dock, so it gets the trait only with that dock (is_wash_water_temperature_offered).CleaningFluidTrait(PropertiesApi.cleaning_fluid), cleaning fluid auto-deliveryget_auto_delivery_cleaning_fluid;set_cleaning_fluid(mode)sendsset_auto_delivery_cleaning_fluidwith{"status": <code>}.RoborockDockCleaningFluidCode: off 0, standard 1, large 3. Code 2 is not a selectable amount.dock_features.is_clean_fluid_auto_delivery_supported.SmartWashParamsTrait(mop wash frequency)SmartWashParams.smart_washis nowRoborockDockSmartWashModeCode | None(by_time 0, by_room 1, new_smart 2) instead ofint | None. It is anIntEnum, so integer comparisons keep working.smart_wash_mode_options: by time and by room, plus new smart withis_back_wash_new_smart_supported.wash_interval_optionsfrom the pureget_wash_interval_options(product_nickname): 600, 900, 1200, 1500 s; 600 to 3000 s in steps of 300 on TopazS, TopazSV, TopazSPlus, TopazSC, TopazSPower and UltronSPlus, which accept a free interval in that range.set_smart_wash_params(mode, wash_interval)sends both values together.DeviceFeaturesTraitand the product nickname, and is created indiscover_features(), likeWashTowelModeTrait.WashTowelModeTraitset_wash_towel_mode(mode)now rejects a mode outsidewash_towel_mode_optionsbefore sending.self_clean_tray()sendsapp_amethyst_self_check, gated bydock_features.is_clean_carousel_self_clean_supported.stop_wash()stops a running self-clean early.RoborockUnsupportedFeaturefor a value the device does not offer, send nothing in that case, and update the trait state only after the command succeeds.docs/V1_API_COMMANDS.md: entries for the new commands and formats,get/set_smart_wash_paramscodes,set_wash_towel_modecodes,app_amethyst_self_check.Wire formats
get_wash_water_temperature→{"wash_water_temperature": n};set_wash_water_temperature{"values": n}get/set_auto_delivery_cleaning_fluid,{"status": n}get/set_smart_wash_params,{"smart_wash": n, "wash_interval": s}get/set_wash_towel_mode,{"wash_mode": n}WashTowelModes)app_amethyst_self_check, no params; stopped byapp_stop_washThe codes, option lists and write formats were compared with the Roborock app's V1 device plugins and match what the app shows. They were confirmed on a Saros 10R (
roborock.vacuum.a144, dock type 16).Left for later
The option lists above are the ones for newer models such as the Saros 10R. Some older models differ in a few places that need model family detection or status fields the library does not have yet; they are left for a follow-up:
Behavior changes for consumers
set_wash_towel_mode()now raisesRoborockUnsupportedFeaturefor a mode outsidewash_towel_mode_options. Callers that pick from that list (as Home Assistant does) are unaffected.SmartWashParams.smart_washis an enum instead of a plain int (see above).Testing
uv run pre-commit run --all-files: all hooks pass.uv run pytest: 2510 passed. Each commit passes on its own.tests/devices/traits/v1/(test_wash_water_temperature.py,test_cleaning_fluid.py,test_smart_wash_params.py,test_wash_towel_mode.py): option lists, setter commands, rejection of unoffered values without sending, state unchanged after a failed command, unknown firmware codes, trait availability per dock type, per hot wash feature and per product (PearlE Pro, older models). A newproduct_modelfixture intests/devices/traits/v1/fixtures.pysets the test device's model.self_clean_tray()the robot state went fromchargingtowashing_the_mop(wash_phase11) and the app showed the self-clean;stop_wash()ended it within 3 s, with the same status changes as the stop button in the app.Related issues