Repository navigation
feat(v1): add dock strainer and cleaning brush consumable fields - #1088
Merged
allenporter merged 1 commit intoNov 24, 2026
Merged
allenporter merged 1 commit into
allenporter merged 1 commit into
Conversation
Callers had to check dock capabilities themselves to know whether a device has a dock strainer or cleaning brush to report and reset. ConsumableField now includes STRAINER_WORK_TIME and CLEANING_BRUSH_WORK_TIME, so is_field_supported answers this from the dock type. The strainer is gated on a new RoborockDockFeatures.is_strainer_supported (carousel docks or O-series docks), which excludes Shell 4R. The cleaning brush is gated on is_cleaning_brush_supported (O-series docks). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hCoureau
force-pushed
the
submit/feat/dock-consumable-fields
branch
from
November 23, 2026 23:32
806ae85 to
e8c0e2a
Compare
allenporter
approved these changes
Nov 24, 2026
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.
What
Adds two members to
ConsumableField:STRAINER_WORK_TIME(strainer_work_times)CLEANING_BRUSH_WORK_TIME(cleaning_brush_work_times)The matching
Consumablefields now carrydock_featuremetadata, soDeviceFeaturesTrait.is_field_supported(ConsumableTrait, field)answers from the dock type:RoborockDockFeatures)strainer_work_timesis_strainer_supported(new:is_clean_carousel_supported or is_only_x_series)cleaning_brush_work_timesis_cleaning_brush_supportedo2,o3,o3_plus,o4,o5,o6,o7,o7h)Other changes:
ConsumableFielddocstring now says fields are gated by eitherdpsordock_featuremetadata.ConsumableTraitdocstring now points callers atis_field_supportedinstead of checking for non-None values.docs/V1_DEVICE_FEATURES.mddocumentsis_strainer_supported.Why a new strainer property
is_washablewas too broad: it reported a strainer on Shell 4R (dock type 32), which the app's carousel list excludes. Gating directly onis_clean_carousel_supportedwould also drop every X-series dock, since the app-derived docs list none of them as carousel docks. The evidence on X-series docks is inconclusive. The app shows the carousel consumable only on non-O-series docks, but theget_consumableexample indocs/V1_API_COMMANDS.mdreportsstrainer_work_timesnext tocleaning_brush_work_times, and earlier releases reported a strainer on every wash dock. Sois_strainer_supportedtakes the union. Compared withis_washable, only Shell 4R changes. If someone confirms that X-series docks have no strainer, theis_only_x_seriesterm can be removed.Why
get_consumablereturns both counters on many devices, andConsumableAttributecan already reset them. But callers had no way to ask whether the device actually has a strainer or cleaning brush, so they had to repeat the dock capability checks themselves. This uses the samedock_featuremechanism thatStatusV2already uses forclear_water_box_statusand similar fields.Testing
test_is_consumable_field_supportedsnapshot (tests/devices/traits/v1/__snapshots__/test_device_features.ambr) covers both new fields for every V1 device fixture. Examples: Qrevo 2 Pro (f1_dock) reports strainer supported and cleaning brush unsupported; S7 MaxV (o3_plus_dock) reports both supported; Q5 Max (o1_dock, collect only) reports neither.test_is_dock_consumable_field_supportedchecksis_field_supportedper dock type, including a Shell 4R negative case for the strainer. That case fails with the earlieris_washablegating.uv run pytest -n auto,ruff checkandruff format --checkall pass.mypyshows only the existingtests/map/test_b01_q10_render.py:502error that is already onmain.🤖 Generated with Claude Code