Skip to content

Commit 0cfa87f

Browse files
committed
feat: add Qrevo S5V dock type code (22) to RoborockDockTypeCode
1 parent 2501e26 commit 0cfa87f

6 files changed

Lines changed: 14 additions & 0 deletions

File tree

roborock/data/v1/v1_code_mappings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ class RoborockDockTypeCode(RoborockEnum):
664664
saros_r10_dock = 16
665665
qrevo_curv_dock = 17
666666
saros_10_dock = 18
667+
qrevo_s5v_dock = 22
667668

668669

669670
class RoborockDockDustCollectionModeCode(RoborockEnum):

roborock/device_features.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ def get_supported_features(self) -> list[str]:
653653
RoborockDockTypeCode.qrevo_s_dock,
654654
RoborockDockTypeCode.saros_r10_dock,
655655
RoborockDockTypeCode.qrevo_curv_dock,
656+
RoborockDockTypeCode.qrevo_s5v_dock,
656657
]
657658

658659

tests/data/v1/test_v1_containers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,15 @@ def test_no_value():
263263
assert "missing" not in RoborockDockTypeCode.values()
264264

265265

266+
def test_qrevo_s5v_dock_type():
267+
"""Test that dock type code 22 (Qrevo S5V dock) is properly recognized."""
268+
modified_status = STATUS.copy()
269+
modified_status["dock_type"] = 22
270+
s = S7MaxVStatus.from_dict(modified_status)
271+
assert s.dock_type == RoborockDockTypeCode.qrevo_s5v_dock
272+
assert s.dock_type.value == 22
273+
274+
266275
def test_multi_maps_list_info(snapshot: SnapshotAssertion) -> None:
267276
"""Test that MultiMapsListInfo can be deserialized correctly."""
268277
data = {

tests/devices/traits/v1/test_dust_collection_mode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def dust_collection_mode_trait(
2929
(RoborockDockTypeCode.s8_dock),
3030
(RoborockDockTypeCode.p10_dock),
3131
(RoborockDockTypeCode.qrevo_s_dock),
32+
(RoborockDockTypeCode.qrevo_s5v_dock),
3233
],
3334
)
3435
async def test_dust_collection_mode_available(

tests/devices/traits/v1/test_smart_wash_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def smart_wash_params_trait(
3030
(RoborockDockTypeCode.s8_dock),
3131
(RoborockDockTypeCode.p10_dock),
3232
(RoborockDockTypeCode.qrevo_s_dock),
33+
(RoborockDockTypeCode.qrevo_s5v_dock),
3334
],
3435
)
3536
async def test_smart_wash_available(

tests/devices/traits/v1/test_wash_towel_mode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def wash_towel_mode_trait(
3131
(RoborockDockTypeCode.s8_dock),
3232
(RoborockDockTypeCode.p10_dock),
3333
(RoborockDockTypeCode.qrevo_s_dock),
34+
(RoborockDockTypeCode.qrevo_s5v_dock),
3435
],
3536
)
3637
async def test_wash_towel_mode_available(

0 commit comments

Comments
 (0)