Skip to content

Commit

Permalink
feat: adding valley_electricity_timer to props
Browse files Browse the repository at this point in the history
  • Loading branch information
humbertogontijo committed Jun 14, 2023
1 parent d80aab0 commit 0844067
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions roborock/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,13 @@ async def get_dock_summary(self, dock_type: RoborockDockTypeCode) -> DockSummary
@fallback_cache
async def get_prop(self) -> DeviceProp | None:
"""Gets device general properties."""
[status, dnd_timer, clean_summary, consumable] = await asyncio.gather(
[status, clean_summary, consumable, dnd_timer, valley_electricity_timer] = await asyncio.gather(
*[
self.get_status(),
self.get_dnd_timer(),
self.get_clean_summary(),
self.get_consumable(),
self.get_dnd_timer(),
self.get_valley_electricity_timer(),
]
)
last_clean_record = None
Expand All @@ -340,9 +341,10 @@ async def get_prop(self) -> DeviceProp | None:
if any([status, dnd_timer, clean_summary, consumable]):
return DeviceProp(
status,
dnd_timer,
clean_summary,
consumable,
dnd_timer,
valley_electricity_timer,
last_clean_record,
dock_summary,
)
Expand Down
5 changes: 3 additions & 2 deletions roborock/roborock_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
RoborockBase,
SmartWashParams,
Status,
WashTowelMode,
ValleyElectricityTimer, WashTowelMode,
)


Expand Down Expand Up @@ -311,9 +311,10 @@ class DockSummary(RoborockBase):
@dataclass
class DeviceProp(RoborockBase):
status: Optional[Status] = None
dnd_timer: Optional[DnDTimer] = None
clean_summary: Optional[CleanSummary] = None
consumable: Optional[Consumable] = None
dnd_timer: Optional[DnDTimer] = None
valley_electricity_timer: Optional[ValleyElectricityTimer] = None
last_clean_record: Optional[CleanRecord] = None
dock_summary: Optional[DockSummary] = None

Expand Down

0 comments on commit 0844067

Please sign in to comment.