Skip to content

Commit

Permalink
fix: Unknow values on HA component (#117)
Browse files Browse the repository at this point in the history
* feat add Q REVO support (RoborockFanSpeedP10 + RoborockMopModeP10)

* feat add Q REVO support (model ROBOROCK_P10/roborock.vacuum.a75)

* feat add Q REVO support (P10Status)

* feat add Q REVO support (status data)

* fix(P10Status): Change RoborockMopModeP10 by RoborockMopModeS8ProUltra

* fix(RoborockMopModeP10): Remove

* fix: change ordering of imports

* fix: change q_revo->p10 to be consistent with entire code

* fix: for HA component(items: dock_mop_wash_mode_interval,
dock_washing_mode) stuck at "unknow" value when using P10

---------

Co-authored-by: jalcaras <[email protected]>
Co-authored-by: jalcaras <[email protected]>
Co-authored-by: Luke <[email protected]>
  • Loading branch information
4 people authored Sep 6, 2023
1 parent aeb578b commit 1323618
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion roborock/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@
RoborockCommand.GET_MULTI_MAP,
]
RT = TypeVar("RT", bound=RoborockBase)
WASH_N_FILL_DOCK = [
RoborockDockTypeCode.empty_wash_fill_dock,
RoborockDockTypeCode.s8_dock,
RoborockDockTypeCode.p10_dock,
]


def md5hex(message: str) -> str:
Expand Down Expand Up @@ -454,7 +459,7 @@ async def get_dock_summary(self, dock_type: RoborockDockTypeCode) -> DockSummary
DustCollectionMode | WashTowelMode | SmartWashParams | None,
]
] = [self.get_dust_collection_mode()]
if dock_type == RoborockDockTypeCode.empty_wash_fill_dock or dock_type == RoborockDockTypeCode.s8_dock:
if dock_type in WASH_N_FILL_DOCK:
commands += [
self.get_wash_towel_mode(),
self.get_smart_wash_params(),
Expand Down
2 changes: 1 addition & 1 deletion roborock/code_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ class RoborockDockTypeCode(RoborockEnum):
auto_empty_dock_pure = 5
s7_max_ultra_dock = 6
s8_dock = 7
q_revo = 8
p10_dock = 8


class RoborockDockDustCollectionModeCode(RoborockEnum):
Expand Down

0 comments on commit 1323618

Please sign in to comment.