@@ -225,7 +225,7 @@ def _get_payload(
225
225
async def send_command (self , method : RoborockCommand , params : Optional [list | dict ] = None ):
226
226
raise NotImplementedError
227
227
228
- @fallback_cache ()
228
+ @fallback_cache
229
229
async def get_status (self ) -> Status | None :
230
230
status = await self .send_command (RoborockCommand .GET_STATUS )
231
231
if isinstance (status , dict ):
@@ -235,14 +235,14 @@ async def get_status(self) -> Status | None:
235
235
return _cls .from_dict (status )
236
236
return None
237
237
238
- @fallback_cache ()
238
+ @fallback_cache
239
239
async def get_dnd_timer (self ) -> DnDTimer | None :
240
240
dnd_timer = await self .send_command (RoborockCommand .GET_DND_TIMER )
241
241
if isinstance (dnd_timer , dict ):
242
242
return DnDTimer .from_dict (dnd_timer )
243
243
return None
244
244
245
- @fallback_cache ()
245
+ @fallback_cache
246
246
async def get_clean_summary (self ) -> CleanSummary | None :
247
247
clean_summary = await self .send_command (RoborockCommand .GET_CLEAN_SUMMARY )
248
248
if isinstance (clean_summary , dict ):
@@ -259,42 +259,42 @@ async def get_clean_summary(self) -> CleanSummary | None:
259
259
return CleanSummary (clean_time = clean_summary )
260
260
return None
261
261
262
- @fallback_cache ()
262
+ @fallback_cache
263
263
async def get_clean_record (self , record_id : int ) -> CleanRecord | None :
264
264
clean_record = await self .send_command (RoborockCommand .GET_CLEAN_RECORD , [record_id ])
265
265
if isinstance (clean_record , dict ):
266
266
return CleanRecord .from_dict (clean_record )
267
267
return None
268
268
269
- @fallback_cache ()
269
+ @fallback_cache
270
270
async def get_consumable (self ) -> Consumable | None :
271
271
consumable = await self .send_command (RoborockCommand .GET_CONSUMABLE )
272
272
if isinstance (consumable , dict ):
273
273
return Consumable .from_dict (consumable )
274
274
return None
275
275
276
- @fallback_cache ()
276
+ @fallback_cache
277
277
async def get_wash_towel_mode (self ) -> WashTowelMode | None :
278
278
washing_mode = await self .send_command (RoborockCommand .GET_WASH_TOWEL_MODE )
279
279
if isinstance (washing_mode , dict ):
280
280
return WashTowelMode .from_dict (washing_mode )
281
281
return None
282
282
283
- @fallback_cache ()
283
+ @fallback_cache
284
284
async def get_dust_collection_mode (self ) -> DustCollectionMode | None :
285
285
dust_collection = await self .send_command (RoborockCommand .GET_DUST_COLLECTION_MODE )
286
286
if isinstance (dust_collection , dict ):
287
287
return DustCollectionMode .from_dict (dust_collection )
288
288
return None
289
289
290
- @fallback_cache ()
290
+ @fallback_cache
291
291
async def get_smart_wash_params (self ) -> SmartWashParams | None :
292
292
mop_wash_mode = await self .send_command (RoborockCommand .GET_SMART_WASH_PARAMS )
293
293
if isinstance (mop_wash_mode , dict ):
294
294
return SmartWashParams .from_dict (mop_wash_mode )
295
295
return None
296
296
297
- @fallback_cache ()
297
+ @fallback_cache
298
298
async def get_dock_summary (self , dock_type : RoborockDockTypeCode ) -> DockSummary | None :
299
299
"""Gets the status summary from the dock with the methods available for a given dock.
300
300
@@ -316,7 +316,7 @@ async def get_dock_summary(self, dock_type: RoborockDockTypeCode) -> DockSummary
316
316
)
317
317
return DockSummary (dust_collection_mode , wash_towel_mode , smart_wash_params )
318
318
319
- @fallback_cache ()
319
+ @fallback_cache
320
320
async def get_prop (self ) -> DeviceProp | None :
321
321
"""Gets device general properties."""
322
322
[status , dnd_timer , clean_summary , consumable ] = await asyncio .gather (
@@ -344,21 +344,21 @@ async def get_prop(self) -> DeviceProp | None:
344
344
)
345
345
return None
346
346
347
- @fallback_cache ()
347
+ @fallback_cache
348
348
async def get_multi_maps_list (self ) -> MultiMapsList | None :
349
349
multi_maps_list = await self .send_command (RoborockCommand .GET_MULTI_MAPS_LIST )
350
350
if isinstance (multi_maps_list , dict ):
351
351
return MultiMapsList .from_dict (multi_maps_list )
352
352
return None
353
353
354
- @fallback_cache ()
354
+ @fallback_cache
355
355
async def get_networking (self ) -> NetworkInfo | None :
356
356
networking_info = await self .send_command (RoborockCommand .GET_NETWORK_INFO )
357
357
if isinstance (networking_info , dict ):
358
358
return NetworkInfo .from_dict (networking_info )
359
359
return None
360
360
361
- @fallback_cache ()
361
+ @fallback_cache
362
362
async def get_room_mapping (self ) -> list [RoomMapping ] | None :
363
363
"""Gets the mapping from segment id -> iot id. Only works on local api."""
364
364
mapping = await self .send_command (RoborockCommand .GET_ROOM_MAPPING )
0 commit comments