38
38
RoborockDeviceInfo ,
39
39
WashTowelMode ,
40
40
DustCollectionMode ,
41
+ NetworkInfo ,
41
42
42
43
)
43
44
from .roborock_message import RoborockMessage
@@ -286,7 +287,7 @@ async def get_dock_summary(self, device_id: str, dock_type: RoborockDockType) ->
286
287
except RoborockTimeout as e :
287
288
_LOGGER .error (e )
288
289
289
- async def get_prop (self , device_id : str ) -> RoborockDeviceProp :
290
+ async def get_prop (self , device_id : str ) -> RoborockDeviceProp | None :
290
291
[status , dnd_timer , clean_summary , consumable ] = await asyncio .gather (
291
292
* [
292
293
self .get_status (device_id ),
@@ -307,6 +308,7 @@ async def get_prop(self, device_id: str) -> RoborockDeviceProp:
307
308
return RoborockDeviceProp (
308
309
status , dnd_timer , clean_summary , consumable , last_clean_record , dock_summary
309
310
)
311
+ return None
310
312
311
313
async def get_multi_maps_list (self , device_id ) -> MultiMapsList :
312
314
try :
@@ -321,6 +323,14 @@ async def get_multi_maps_list(self, device_id) -> MultiMapsList:
321
323
async def get_map_v1 (self , device_id ):
322
324
return await self .send_command (device_id , RoborockCommand .GET_MAP_V1 )
323
325
326
+ async def get_networking (self , device_id ) -> NetworkInfo :
327
+ try :
328
+ networking_info = await self .send_command (device_id , RoborockCommand .GET_NETWORK_INFO )
329
+ if isinstance (networking_info , dict ):
330
+ return NetworkInfo (networking_info )
331
+ except RoborockTimeout as e :
332
+ _LOGGER .error (e )
333
+
324
334
325
335
class RoborockApiClient :
326
336
def __init__ (self , username : str , base_url = None ) -> None :
0 commit comments