Skip to content

Commit

Permalink
fix: add a warning for wrong type of clean area and add new dock (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L authored Oct 19, 2024
1 parent db916a2 commit c334eb2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions roborock/code_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ class RoborockDockTypeCode(RoborockEnum):
p10_dock = 8
p10_pro_dock = 9
s8_maxv_ultra_dock = 10
qrevo_s_dock = 15


class RoborockDockDustCollectionModeCode(RoborockEnum):
Expand Down
5 changes: 4 additions & 1 deletion roborock/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,10 @@ class CleanSummary(RoborockBase):
last_clean_t: int | None = None

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


@dataclass
Expand Down
1 change: 1 addition & 0 deletions roborock/version_1_apis/roborock_client_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
RoborockDockTypeCode.p10_dock,
RoborockDockTypeCode.p10_pro_dock,
RoborockDockTypeCode.s8_maxv_ultra_dock,
RoborockDockTypeCode.qrevo_s_dock,
]
RT = TypeVar("RT", bound=RoborockBase)
EVICT_TIME = 60
Expand Down

0 comments on commit c334eb2

Please sign in to comment.