Skip to content

Commit e24004e

Browse files
authored
Add methods to empty dustbin and set clean mode
1 parent 76605ac commit e24004e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

roborock/devices/traits/b01/q10/vacuum.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Traits for Q10 B01 devices."""
22

3-
from roborock.data.b01_q10.b01_q10_code_mappings import B01_Q10_DP
3+
from roborock.data.b01_q10.b01_q10_code_mappings import B01_Q10_DP, YXCleanType
44

55
from .command import CommandTrait
66

@@ -54,3 +54,17 @@ async def return_to_dock(self) -> None:
5454
command=B01_Q10_DP.START_DOCK_TASK,
5555
params={},
5656
)
57+
58+
async def empty_dustbin(self) -> None:
59+
"""Empty the dustbin at the dock."""
60+
await self._command.send(
61+
command=B01_Q10_DP.START_DOCK_TASK,
62+
params=2,
63+
)
64+
65+
async def set_clean_mode(self, mode: YXCleanType) -> None:
66+
"""Set the cleaning mode (vacuum, mop, or both)."""
67+
await self._command.send(
68+
command=B01_Q10_DP.CLEAN_MODE,
69+
params=mode.code,
70+
)

0 commit comments

Comments
 (0)