File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change 19
19
20
20
from .code_mappings import RoborockDockTypeCode
21
21
from .containers import (
22
+ ChildLockStatus ,
22
23
CleanRecord ,
23
24
CleanSummary ,
24
25
Consumable ,
@@ -369,6 +370,19 @@ async def get_room_mapping(self) -> list[RoomMapping] | None:
369
370
]
370
371
return None
371
372
373
+ @fallback_cache
374
+ async def get_child_lock_status (self ) -> ChildLockStatus | None :
375
+ """Gets current child lock status."""
376
+ child_lock_status = await self .send_command (RoborockCommand .GET_CHILD_LOCK_STATUS )
377
+ if isinstance (child_lock_status , dict ):
378
+ return ChildLockStatus .from_dict (child_lock_status )
379
+ return None
380
+
381
+ @fallback_cache
382
+ async def get_sound_volume (self ) -> int | None :
383
+ """Gets current volume level."""
384
+ return await self .send_command (RoborockCommand .GET_SOUND_VOLUME )
385
+
372
386
373
387
class RoborockApiClient :
374
388
def __init__ (self , username : str , base_url = None ) -> None :
Original file line number Diff line number Diff line change 32
32
ROBOROCK_1S = "roborock.vacuum.m1s"
33
33
ROBOROCK_C1 = "roborock.vacuum.c1"
34
34
ROBOROCK_S8_PRO_ULTRA = "roborock.vacuum.a70"
35
- ROBOROCK_S8 = "roborock.vacuum.a60" # CHECK THIS
36
- ROBOROCK_WILD = "roborock.vacuum.*" # wildcard
35
+ ROBOROCK_S8 = "roborock.vacuum.a51"
37
36
38
37
SUPPORTED_VACUUMS = (
39
38
[ # These are the devices that show up when you add a device - more could be supported and just not show up
Original file line number Diff line number Diff line change @@ -474,6 +474,11 @@ class RoomMapping(RoborockBase):
474
474
iot_id : str
475
475
476
476
477
+ @dataclass
478
+ class ChildLockStatus (RoborockBase ):
479
+ lock_status : int
480
+
481
+
477
482
@dataclass
478
483
class BroadcastMessage (RoborockBase ):
479
484
duid : str
You can’t perform that action at this time.
0 commit comments