Skip to content

Commit 0a0c9e7

Browse files
fix: clean_summary for older devices
1 parent 16bd2d1 commit 0a0c9e7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roborock/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ async def get_clean_summary(self, device_id: str) -> CleanSummary | None:
213213
)
214214
if isinstance(clean_summary, dict):
215215
return CleanSummary.from_dict(clean_summary)
216-
elif isinstance(clean_summary, bytes):
217-
return CleanSummary(clean_time=int.from_bytes(clean_summary, 'big'))
216+
elif isinstance(clean_summary, int):
217+
return CleanSummary(clean_time=clean_summary)
218218
except RoborockTimeout as e:
219219
_LOGGER.error(e)
220220
return None

roborock/local_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@ async def send_message(self, data: bytes) -> None:
176176
f"Timeout after {self.timeout} seconds waiting for response"
177177
) from None
178178
except BrokenPipeError as e:
179-
_LOGGER.exception(e)
180179
await self.disconnect()
180+
raise RoborockException(e) from e

0 commit comments

Comments
 (0)