Skip to content

Commit 0844067

Browse files
feat: adding valley_electricity_timer to props
1 parent d80aab0 commit 0844067

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

roborock/api.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,12 +323,13 @@ async def get_dock_summary(self, dock_type: RoborockDockTypeCode) -> DockSummary
323323
@fallback_cache
324324
async def get_prop(self) -> DeviceProp | None:
325325
"""Gets device general properties."""
326-
[status, dnd_timer, clean_summary, consumable] = await asyncio.gather(
326+
[status, clean_summary, consumable, dnd_timer, valley_electricity_timer] = await asyncio.gather(
327327
*[
328328
self.get_status(),
329-
self.get_dnd_timer(),
330329
self.get_clean_summary(),
331330
self.get_consumable(),
331+
self.get_dnd_timer(),
332+
self.get_valley_electricity_timer(),
332333
]
333334
)
334335
last_clean_record = None
@@ -340,9 +341,10 @@ async def get_prop(self) -> DeviceProp | None:
340341
if any([status, dnd_timer, clean_summary, consumable]):
341342
return DeviceProp(
342343
status,
343-
dnd_timer,
344344
clean_summary,
345345
consumable,
346+
dnd_timer,
347+
valley_electricity_timer,
346348
last_clean_record,
347349
dock_summary,
348350
)

roborock/roborock_typing.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
RoborockBase,
1414
SmartWashParams,
1515
Status,
16-
WashTowelMode,
16+
ValleyElectricityTimer, WashTowelMode,
1717
)
1818

1919

@@ -311,9 +311,10 @@ class DockSummary(RoborockBase):
311311
@dataclass
312312
class DeviceProp(RoborockBase):
313313
status: Optional[Status] = None
314-
dnd_timer: Optional[DnDTimer] = None
315314
clean_summary: Optional[CleanSummary] = None
316315
consumable: Optional[Consumable] = None
316+
dnd_timer: Optional[DnDTimer] = None
317+
valley_electricity_timer: Optional[ValleyElectricityTimer] = None
317318
last_clean_record: Optional[CleanRecord] = None
318319
dock_summary: Optional[DockSummary] = None
319320

0 commit comments

Comments
 (0)