Skip to content

Commit c334eb2

Browse files
authored
fix: add a warning for wrong type of clean area and add new dock (#224)
1 parent db916a2 commit c334eb2

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

roborock/code_mappings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ class RoborockDockTypeCode(RoborockEnum):
386386
p10_dock = 8
387387
p10_pro_dock = 9
388388
s8_maxv_ultra_dock = 10
389+
qrevo_s_dock = 15
389390

390391

391392
class RoborockDockDustCollectionModeCode(RoborockEnum):

roborock/containers.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,10 @@ class CleanSummary(RoborockBase):
612612
last_clean_t: int | None = None
613613

614614
def __post_init__(self) -> None:
615-
self.square_meter_clean_area = round(self.clean_area / 1000000, 1) if self.clean_area is not None else None
615+
if isinstance(self.clean_area, list):
616+
_LOGGER.warning(f"Clean area is a unexpected type! Please give the following in a issue: {self.clean_area}")
617+
else:
618+
self.square_meter_clean_area = round(self.clean_area / 1000000, 1) if self.clean_area is not None else None
616619

617620

618621
@dataclass

roborock/version_1_apis/roborock_client_v1.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
RoborockDockTypeCode.p10_dock,
6868
RoborockDockTypeCode.p10_pro_dock,
6969
RoborockDockTypeCode.s8_maxv_ultra_dock,
70+
RoborockDockTypeCode.qrevo_s_dock,
7071
]
7172
RT = TypeVar("RT", bound=RoborockBase)
7273
EVICT_TIME = 60

0 commit comments

Comments
 (0)