Skip to content

Commit

Permalink
feat: add custom state for charging and will continue
Browse files Browse the repository at this point in the history
  • Loading branch information
Lash-L committed Oct 20, 2023
1 parent 60e0da6 commit d344b43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions roborock/code_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class RoborockStateCode(RoborockEnum):
going_to_wash_the_mop = 26 # on a46
charging_complete = 100
device_offline = 101
charging_will_continue_cleaning = 9999 # Manually added


class RoborockErrorCode(RoborockEnum):
Expand Down
3 changes: 3 additions & 0 deletions roborock/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ class Status(RoborockBase):

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 a cleaning is still active and we are currently charging - then we should mark it that we will continue.
if self.state == RoborockStateCode.charging and self.in_cleaning:
self.state = RoborockStateCode.charging_will_continue_cleaning


@dataclass
Expand Down

0 comments on commit d344b43

Please sign in to comment.