38
38
RoborockDeviceInfo ,
39
39
WashTowelMode ,
40
40
DustCollectionMode ,
41
+ NetworkInfo ,
41
42
42
43
)
43
44
from .roborock_queue import RoborockQueue
@@ -380,7 +381,7 @@ async def get_dock_summary(self, device_id: str, dock_type: RoborockDockType) ->
380
381
except RoborockTimeout as e :
381
382
_LOGGER .error (e )
382
383
383
- async def get_prop (self , device_id : str ) -> RoborockDeviceProp :
384
+ async def get_prop (self , device_id : str ) -> RoborockDeviceProp | None :
384
385
[status , dnd_timer , clean_summary , consumable ] = await asyncio .gather (
385
386
* [
386
387
self .get_status (device_id ),
@@ -401,6 +402,7 @@ async def get_prop(self, device_id: str) -> RoborockDeviceProp:
401
402
return RoborockDeviceProp (
402
403
status , dnd_timer , clean_summary , consumable , last_clean_record , dock_summary
403
404
)
405
+ return None
404
406
405
407
async def get_multi_maps_list (self , device_id ) -> MultiMapsList :
406
408
try :
@@ -415,6 +417,14 @@ async def get_multi_maps_list(self, device_id) -> MultiMapsList:
415
417
async def get_map_v1 (self , device_id ):
416
418
return await self .send_command (device_id , RoborockCommand .GET_MAP_V1 )
417
419
420
+ async def get_networking (self , device_id ) -> NetworkInfo :
421
+ try :
422
+ networking_info = await self .send_command (device_id , RoborockCommand .GET_NETWORK_INFO )
423
+ if isinstance (networking_info , dict ):
424
+ return NetworkInfo (networking_info )
425
+ except RoborockTimeout as e :
426
+ _LOGGER .error (e )
427
+
418
428
419
429
class RoborockApiClient :
420
430
def __init__ (self , username : str , base_url = None ) -> None :
0 commit comments