Repository navigation
fix: treat o3 docks as dryable when the device supports drying #1065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ryanmac8
wants to merge
1
commit into
Python-roborock:main
Choose a base branch
from
ryanmac8:fix/o3-dock-optional-dryer-module
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -311,6 +311,23 @@ def test_dock_features(dock_type: RoborockDockTypeCode, is_collectable: bool, is | |
| assert is_wash_n_fill_dock(dock_type) is dock_features.is_washable | ||
|
|
||
|
|
||
| def test_dock_drying_depends_on_device_feature() -> None: | ||
| """Drying can come from an optional module rather than the dock family. | ||
|
|
||
| The o3 Empty Wash Fill dock does not dry by itself, but it supports the | ||
| separately sold dryer module (e.g. HADM02RR). The device advertises that | ||
| capability through the ``is_supported_drying`` device feature, so the dock | ||
| type alone must not decide. | ||
| """ | ||
| assert RoborockDockFeatures.from_dock_type(RoborockDockTypeCode.o3_dock).is_dryable is False | ||
| assert ( | ||
| RoborockDockFeatures.from_dock_type(RoborockDockTypeCode.o3_dock, supports_drying=False).is_dryable is False | ||
| ) | ||
| assert RoborockDockFeatures.from_dock_type(RoborockDockTypeCode.o3_dock, supports_drying=True).is_dryable is True | ||
| # Dock families that dry on their own are unaffected by the flag. | ||
| assert RoborockDockFeatures.from_dock_type(RoborockDockTypeCode.o4_dock, supports_drying=False).is_dryable is True | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test Gap: Please also assert that non-washable docks ( |
||
|
|
||
|
|
||
| def test_all_rr_api_dock_types_are_mapped() -> None: | ||
| """Keep the enum synchronized with the RR_API DockConfigs snapshot.""" | ||
| mapped_docks = { | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Priority 1 — Capability Gating (
AGENTS.md§3 Compound Capability & Feature Gating)is_supported_drying(new_feature_infoupper-32-bit flag 15) is a robot firmware capability bit rather than dynamic hardware detection of an installed dryer module—for example,tests/__snapshots__/test_supported_features.ambrshowsis_supported_drying: Trueon S7 MaxV (roborock.vacuum.a27) and newer models regardless of which dock is attached.With
self.is_collect_wash_dry or self.supports_drying is True, a standalone robot with no dock (o0_dock/unknown) or a dust-only Auto-Empty Dock (o1_dock/oc_dock, such as S7 MaxV Plus) will reportis_dryable == Trueand instantiateMopDryerTraiteven thoughhas_dockoris_washableisFalse.In the Roborock app (
RR_API),FM.isSupportedDrying()is only consulted on wash-capable dock screens (o2_dockviaisPureWash, ando3_dock/isCollectWashDryvia!isOldBelowO3()), never foro0_dockor pure-collect docks. Gating onself.is_washablefixeso3_dock(ando2_dock) without falsely enabling drying on dockless or collect-only setups: