Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roborock/data/v1/v1_code_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ class RoborockDockTypeCode(RoborockEnum):
type_27_dock = 27
k1c_lite_dock = 28
shell_2e_lite_dock = 30
type_38_dock = 38
shell_2e_heat_dock = 40


Expand Down
14 changes: 14 additions & 0 deletions tests/test_supported_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_new_feature_str_missing():
(RoborockDockTypeCode.type_27_dock, True, True),
(RoborockDockTypeCode.k1c_lite_dock, True, True),
(RoborockDockTypeCode.shell_2e_lite_dock, True, True),
(RoborockDockTypeCode.type_38_dock, True, True),
(RoborockDockTypeCode.shell_2e_heat_dock, True, True),
],
)
Expand All @@ -122,6 +123,19 @@ 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_qrevo_edge_2_dock_type_is_mapped() -> None:
"""Dock type 38 (Qrevo Edge 2) must resolve to a real wash-and-dry dock."""
dock_type = RoborockDockTypeCode(38)

assert dock_type is not RoborockDockTypeCode.unknown
assert is_valid_dock(dock_type)
assert is_wash_n_fill_dock(dock_type)

dock_features = RoborockDockFeatures.from_dock_type(dock_type)
assert dock_features.is_collectable
assert dock_features.is_dryable


def test_dock_feature_flags_from_rr_api() -> None:
"""Verify dock-specific feature flags that are not currently trait gates."""
assert RoborockDockFeatures.from_dock_type(RoborockDockTypeCode.shell_3s_dock).is_auto_sterilize_supported
Expand Down