Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
Merge pull request #54 from And3rsL/fix-cleanlogs
Browse files Browse the repository at this point in the history
fix handle cleanlogs
  • Loading branch information
edenhaus authored Sep 7, 2021
2 parents 9d05c20 + cd25f1b commit aa68796
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deebotozmo/vacuum_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ async def handle(self, event_name: str, event: dict, requested: bool = True) ->

if requested:
if event.get("ret") == "ok":
event = event.get("resp", {})
if event_name == "cleanlogs":
await self._handle_clean_logs(event)
return
else:
event = event.get("resp", event)
else:
_LOGGER.warning(f"Event {event_name} where ret != \"ok\": {event}")
return
Expand Down Expand Up @@ -179,8 +183,6 @@ async def handle(self, event_name: str, event: dict, requested: bool = True) ->
await self._handle_charge_state(event_data)
elif event_name == "lifespan":
await self._handle_life_span(event_data)
elif event_name == "cleanlogs":
await self._handle_clean_logs(event)
elif event_name == "cleaninfo":
await self._handle_clean_info(event_data)
elif event_name == "waterinfo":
Expand Down

0 comments on commit aa68796

Please sign in to comment.