Skip to content

Commit 7facf13

Browse files
Merge remote-tracking branch 'origin/main'
# Conflicts: # roborock/api.py
2 parents 158766f + 2126ce2 commit 7facf13

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

roborock/api.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
RoborockDeviceInfo,
3939
WashTowelMode,
4040
DustCollectionMode,
41+
NetworkInfo,
4142

4243
)
4344
from .roborock_message import RoborockMessage
@@ -286,7 +287,7 @@ async def get_dock_summary(self, device_id: str, dock_type: RoborockDockType) ->
286287
except RoborockTimeout as e:
287288
_LOGGER.error(e)
288289

289-
async def get_prop(self, device_id: str) -> RoborockDeviceProp:
290+
async def get_prop(self, device_id: str) -> RoborockDeviceProp | None:
290291
[status, dnd_timer, clean_summary, consumable] = await asyncio.gather(
291292
*[
292293
self.get_status(device_id),
@@ -307,6 +308,7 @@ async def get_prop(self, device_id: str) -> RoborockDeviceProp:
307308
return RoborockDeviceProp(
308309
status, dnd_timer, clean_summary, consumable, last_clean_record, dock_summary
309310
)
311+
return None
310312

311313
async def get_multi_maps_list(self, device_id) -> MultiMapsList:
312314
try:
@@ -318,6 +320,14 @@ async def get_multi_maps_list(self, device_id) -> MultiMapsList:
318320
except RoborockTimeout as e:
319321
_LOGGER.error(e)
320322

323+
async def get_networking(self, device_id) -> NetworkInfo:
324+
try:
325+
networking_info = await self.send_command(device_id, RoborockCommand.GET_NETWORK_INFO)
326+
if isinstance(networking_info, dict):
327+
return NetworkInfo(networking_info)
328+
except RoborockTimeout as e:
329+
_LOGGER.error(e)
330+
321331

322332
class RoborockApiClient:
323333
def __init__(self, username: str, base_url=None) -> None:

0 commit comments

Comments
 (0)