Skip to content

feat: add support for dock type 38 - #899

Closed
Sanjays2402 wants to merge 1 commit into
Python-roborock:mainfrom
Sanjays2402:fix/dock-type-38
Closed

feat: add support for dock type 38#899
Sanjays2402 wants to merge 1 commit into
Python-roborock:mainfrom
Sanjays2402:fix/dock-type-38

Conversation

@Sanjays2402

Copy link
Copy Markdown

Closes #896

Dock type 38 (Qrevo Edge 2, roborock.vacuum.a298) has no RoborockDockTypeCode member, so RoborockDockTypeCode(38) falls back to unknown. That makes is_valid_dock and is_wash_n_fill_dock return False and 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 main and passes with the fix.

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.
Copilot AI review requested due to automatic review settings July 25, 2026 00:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 = 38 to 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 to unknown and 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.

@Lash-L

Lash-L commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Hi @Sanjays2402! Thanks for the PR, I went ahead and did a full dock type update here that should encompass that! f431c5d

@Lash-L Lash-L closed this Jul 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing RoborockDockTypeCode 38 — Qrevo Edge 2 (roborock.vacuum.a298) dock entities not created

3 participants