Skip to content

Commit

Permalink
Fixes for r2216o
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiğit Topcu committed Nov 29, 2022
1 parent 8f01b1d commit 6c189ee
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 59 deletions.
5 changes: 3 additions & 2 deletions custom_components/dreame_vacuum/dreame/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def _water_tank_changed(self, previous_water_tank: Any = None) -> None:
if not self.status.sweeping_with_mop_pad_available:
new_list.pop(DreameVacuumCleaningMode.SWEEPING)

if not self.status.started and self.status.cleaning_mode is DreameVacuumCleaningMode.SWEEPING:
if not self.status.started and self.status.sweeping:
if (
self._previous_cleaning_mode is not None
and self._previous_cleaning_mode
Expand Down Expand Up @@ -981,6 +981,7 @@ def update(self) -> None:
DreameVacuumProperty.CARPET_AVOIDANCE,
DreameVacuumProperty.CLEANING_MODE,
DreameVacuumProperty.WATER_ELECTROLYSIS,
DreameVacuumProperty.AUTO_DRYING,
DreameVacuumProperty.AUTO_WATER_REFILLING,
DreameVacuumProperty.AUTO_MOUNT_MOP,
DreameVacuumProperty.MOP_WASH_LEVEL,
Expand Down Expand Up @@ -2864,7 +2865,7 @@ def self_wash_base_available(self) -> bool:
@property
def sweeping_with_mop_pad_available(self) -> bool:
"""Returns true when device has capability to only sweep while mop pad is attached."""
return bool(self.self_wash_base_available and self.auto_empty_base_available) # or self._get_property(DreameVacuumProperty.CARPET_AVOIDANCE) != None
return bool(self.self_wash_base_available and (self.auto_empty_base_available or (self._device.info and "r2216" in self._device.info.model))) # or self._get_property(DreameVacuumProperty.CARPET_AVOIDANCE) != None

@property
def ai_detection_available(self) -> bool:
Expand Down
Loading

0 comments on commit 6c189ee

Please sign in to comment.