Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Unknow values on HA component #117

Merged
merged 10 commits into from
Sep 6, 2023
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
Loading