Skip to content

Commit

Permalink
v2.0.0b11
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiğit Topcu committed Dec 16, 2023
1 parent 2a20251 commit df549c2
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![version](https://img.shields.io/github/manifest-json/v/Tasshack/dreame-vacuum/dev?filename=custom_components%2Fdreame_vacuum%2Fmanifest.json&color=slateblue)](https://github.com/Tasshack/dreame-vacuum/releases)
[![version](https://img.shields.io/github/manifest-json/v/Tasshack/dreame-vacuum/dev?filename=custom_components%2Fdreame_vacuum%2Fmanifest.json&color=slateblue&label=version)](https://github.com/Tasshack/dreame-vacuum/releases)
![GitHub all releases](https://img.shields.io/github/downloads/Tasshack/dreame-vacuum/total)
[![HACS](https://img.shields.io/badge/HACS-Default-orange.svg?logo=HomeAssistantCommunityStore&logoColor=white)](https://github.com/hacs/integration)
[![Community Forum](https://img.shields.io/static/v1.svg?label=Community&message=Forum&color=41bdf5&logo=HomeAssistant&logoColor=white)](https://community.home-assistant.io/t/custom-component-dreame-vacuum/473026)
Expand Down
56 changes: 27 additions & 29 deletions custom_components/dreame_vacuum/dreame/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -801,32 +801,31 @@ def _water_tank_changed(self, previous_water_tank: Any = None) -> None:
)
except:
pass
else:
if not self.capability.mop_pad_lifting:
new_list.pop(DreameVacuumCleaningMode.SWEEPING)
if (
elif not self.capability.mop_pad_lifting:
new_list.pop(DreameVacuumCleaningMode.SWEEPING)
if (
DreameVacuumCleaningMode.MOPPING_AFTER_SWEEPING
in new_list
):
new_list.pop(
DreameVacuumCleaningMode.MOPPING_AFTER_SWEEPING
in new_list
):
new_list.pop(
DreameVacuumCleaningMode.MOPPING_AFTER_SWEEPING
)
if self.status.sweeping:
if self._ready and not self.status.scheduled_clean:
if (
self._previous_cleaning_mode is not None
and self._previous_cleaning_mode
is not DreameVacuumCleaningMode.SWEEPING
):
self._update_cleaning_mode(
self._previous_cleaning_mode.value
)
else:
self._update_cleaning_mode(
DreameVacuumCleaningMode.SWEEPING_AND_MOPPING.value
)
# Store current cleaning mode for future use when water tank is removed
self._previous_cleaning_mode = self.status.cleaning_mode
)
if self.status.sweeping:
if self._ready and not self.status.scheduled_clean:
if (
self._previous_cleaning_mode is not None
and self._previous_cleaning_mode
is not DreameVacuumCleaningMode.SWEEPING
):
self._update_cleaning_mode(
self._previous_cleaning_mode.value
)
else:
self._update_cleaning_mode(
DreameVacuumCleaningMode.SWEEPING_AND_MOPPING.value
)
# Store current cleaning mode for future use when water tank is removed
self._previous_cleaning_mode = self.status.cleaning_mode
except:
pass

Expand Down Expand Up @@ -2801,7 +2800,7 @@ def set_cleaning_mode(self, cleaning_mode: int) -> bool:
#if not self.status.auto_mount_mop: # or not self.status.mop_in_station:
if cleaning_mode is DreameVacuumCleaningMode.SWEEPING.value:
if (
self.status.water_tank_or_mop_installed
self.status.water_tank_or_mop_installed and not self.capability.mop_pad_lifting
):
if self.capability.self_wash_base:
raise InvalidActionException(
Expand Down Expand Up @@ -3740,9 +3739,8 @@ def start_fast_mapping(self) -> dict[str, Any] | None:
)

if (
not self.capability.self_wash_base
and self.status.water_tank_or_mop_installed
and not self.status.auto_mount_mop
self.status.water_tank_or_mop_installed
and not self.capability.mop_pad_lifting
):
raise InvalidActionException(
"Please make sure the mop pad is not installed before fast mapping."
Expand Down
2 changes: 1 addition & 1 deletion custom_components/dreame_vacuum/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
"tzlocal",
"paho-mqtt"
],
"version": "v2.0.0b10"
"version": "v2.0.0b11"
}
2 changes: 1 addition & 1 deletion info.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![version](https://img.shields.io/github/manifest-json/v/Tasshack/dreame-vacuum/dev?filename=custom_components%2Fdreame_vacuum%2Fmanifest.json&color=slateblue)](https://github.com/Tasshack/dreame-vacuum/releases)
[![version](https://img.shields.io/github/manifest-json/v/Tasshack/dreame-vacuum/dev?filename=custom_components%2Fdreame_vacuum%2Fmanifest.json&color=slateblue&label=version)](https://github.com/Tasshack/dreame-vacuum/releases)
![GitHub all releases](https://img.shields.io/github/downloads/Tasshack/dreame-vacuum/total)
![GitHub issues](https://img.shields.io/github/issues/Tasshack/dreame-vacuum)
[![HACS](https://img.shields.io/badge/HACS-Default-orange.svg?logo=HomeAssistantCommunityStore&logoColor=white)](https://github.com/hacs/integration)
Expand Down
2 changes: 1 addition & 1 deletion install
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [ -n "$path" ]; then
mkdir "$path/custom_components"
fi
cd "$path/custom_components"
wget "https://github.com/Tasshack/dreame-vacuum/releases/download/v2.0.0b10/dreame_vacuum.zip"
wget "https://github.com/Tasshack/dreame-vacuum/releases/download/v2.0.0b11/dreame_vacuum.zip"
if [ -d "$path/custom_components/dreame_vacuum" ]; then
rm -R "$path/custom_components/dreame_vacuum"
fi
Expand Down

0 comments on commit df549c2

Please sign in to comment.