feat: add support for dock type 38 - #899
Closed
Sanjays2402 wants to merge 1 commit into
Closed
Conversation
Dock type 38 (Qrevo Edge 2, roborock.vacuum.a298) was missing from RoborockDockTypeCode, so RoborockDockTypeCode(38) fell back to unknown. Downstream that made is_valid_dock and is_wash_n_fill_dock return False and the dock traits were skipped, leaving the tank and strainer entities unavailable even though the device reports the data. Add the enum member so the dock resolves to a collect/wash/dry dock, plus a regression test and a parametrized dock-feature case.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds first-class support for Roborock dock type code 38 so devices like Qrevo Edge 2 no longer resolve to unknown, allowing dock trait gating (is_valid_dock, is_wash_n_fill_dock) and resulting dock entities (tanks/strainer/etc.) to be created as expected.
Changes:
- Add
RoborockDockTypeCode.type_38_dock = 38to the V1 code mappings. - Extend existing dock-feature parametrized tests to include the new enum member.
- Add a regression test asserting
RoborockDockTypeCode(38)no longer falls back tounknownand yields wash/dry/collect dock capabilities.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
roborock/data/v1/v1_code_mappings.py |
Adds enum member for dock type 38 so the library can resolve the dock type correctly. |
tests/test_supported_features.py |
Adds coverage ensuring dock type 38 is mapped and treated as a valid wash/dry/collect dock. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
Hi @Sanjays2402! Thanks for the PR, I went ahead and did a full dock type update here that should encompass that! f431c5d |
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.
Closes #896
Dock type 38 (Qrevo Edge 2,
roborock.vacuum.a298) has noRoborockDockTypeCodemember, soRoborockDockTypeCode(38)falls back tounknown. That makesis_valid_dockandis_wash_n_fill_dockreturnFalseand the dock traits are skipped, leaving the water-tank and strainer entities unavailable even though the device reports the data.Adds the enum member (following #894 for dock type 31) so the dock resolves as a collect/wash/dry dock, plus a regression test that fails on
mainand passes with the fix.