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 1919
2020from .code_mappings import RoborockDockTypeCode
2121from .containers import (
22+ ChildLockStatus ,
2223 CleanRecord ,
2324 CleanSummary ,
2425 Consumable ,
@@ -369,6 +370,19 @@ async def get_room_mapping(self) -> list[RoomMapping] | None:
369370 ]
370371 return None
371372
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+
372386
373387class RoborockApiClient :
374388 def __init__ (self , username : str , base_url = None ) -> None :
Original file line number Diff line number Diff line change 3232ROBOROCK_1S = "roborock.vacuum.m1s"
3333ROBOROCK_C1 = "roborock.vacuum.c1"
3434ROBOROCK_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"
3736
3837SUPPORTED_VACUUMS = (
3938 [ # 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):
474474 iot_id : str
475475
476476
477+ @dataclass
478+ class ChildLockStatus (RoborockBase ):
479+ lock_status : int
480+
481+
477482@dataclass
478483class BroadcastMessage (RoborockBase ):
479484 duid : str
You can’t perform that action at this time.
0 commit comments