python-roborock 4.20.0__tar.gz → 4.21.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_roborock-4.20.0 → python_roborock-4.21.0}/PKG-INFO +1 -1
- {python_roborock-4.20.0 → python_roborock-4.21.0}/pyproject.toml +1 -1
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/v1/v1_code_mappings.py +0 -11
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/v1/v1_containers.py +2 -2
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/__init__.py +6 -0
- python_roborock-4.21.0/roborock/devices/traits/v1/wash_towel_mode.py +48 -0
- python_roborock-4.20.0/roborock/devices/traits/v1/wash_towel_mode.py +0 -13
- {python_roborock-4.20.0 → python_roborock-4.21.0}/.gitignore +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/LICENSE +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/README.md +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/broadcast_protocol.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/callbacks.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/cli.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/const.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q10/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q10/b01_q10_code_mappings.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q10/b01_q10_containers.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q7/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q7/b01_q7_code_mappings.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q7/b01_q7_containers.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/code_mappings.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/containers.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/dyad/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/dyad/dyad_code_mappings.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/dyad/dyad_containers.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/v1/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/v1/v1_clean_modes.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/zeo/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/zeo/zeo_code_mappings.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/zeo/zeo_containers.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/device_features.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/README.md +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/cache.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/device.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/device_manager.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/file_cache.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/rpc/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/rpc/a01_channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/rpc/b01_q10_channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/rpc/b01_q7_channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/rpc/v1_channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/a01/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/command.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/common.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/status.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/vacuum.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q7/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q7/clean_summary.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/traits_mixin.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/child_lock.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/clean_summary.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/command.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/common.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/consumeable.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/device_features.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/do_not_disturb.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/dust_collection_mode.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/flow_led_status.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/home.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/led_status.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/map_content.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/maps.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/network_info.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/rooms.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/routines.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/smart_wash_params.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/status.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/valley_electricity_timer.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/volume.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/transport/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/transport/channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/transport/local_channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/transport/mqtt_channel.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/diagnostics.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/exceptions.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/map/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/map/map_parser.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/mqtt/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/mqtt/health_manager.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/mqtt/roborock_session.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/mqtt/session.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/protocol.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/protocols/__init__.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/protocols/a01_protocol.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/protocols/b01_q10_protocol.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/protocols/b01_q7_protocol.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/protocols/v1_protocol.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/py.typed +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/roborock_message.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/roborock_typing.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/util.py +0 -0
- {python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/web_api.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-roborock
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.21.0
|
|
4
4
|
Summary: A package to control Roborock vacuums.
|
|
5
5
|
Project-URL: Repository, https://github.com/humbertogontijo/python-roborock
|
|
6
6
|
Project-URL: Documentation, https://python-roborock.readthedocs.io/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-roborock"
|
|
3
|
-
version = "4.
|
|
3
|
+
version = "4.21.0"
|
|
4
4
|
description = "A package to control Roborock vacuums."
|
|
5
5
|
authors = [{ name = "humbertogontijo", email = "humbertogontijo@users.noreply.github.com" }, {name="Lash-L"}, {name="allenporter"}]
|
|
6
6
|
requires-python = ">=3.11, <4"
|
|
@@ -587,17 +587,6 @@ class RoborockDockDustCollectionModeCode(RoborockEnum):
|
|
|
587
587
|
max = 4
|
|
588
588
|
|
|
589
589
|
|
|
590
|
-
class RoborockDockWashTowelModeCode(RoborockEnum):
|
|
591
|
-
"""Describes the wash towel mode of the vacuum cleaner."""
|
|
592
|
-
|
|
593
|
-
# TODO: Get the correct values for various different docks
|
|
594
|
-
unknown = -9999
|
|
595
|
-
light = 0
|
|
596
|
-
balanced = 1
|
|
597
|
-
deep = 2
|
|
598
|
-
smart = 10
|
|
599
|
-
|
|
600
|
-
|
|
601
590
|
class RoborockStateCode(RoborockEnum):
|
|
602
591
|
unknown = 0
|
|
603
592
|
starting = 1
|
|
@@ -39,6 +39,7 @@ from roborock.const import (
|
|
|
39
39
|
from roborock.exceptions import RoborockException
|
|
40
40
|
|
|
41
41
|
from ..containers import NamedRoomMapping, RoborockBase, RoborockBaseTimer, _attr_repr
|
|
42
|
+
from .v1_clean_modes import WashTowelModes
|
|
42
43
|
from .v1_code_mappings import (
|
|
43
44
|
CleanFluidStatus,
|
|
44
45
|
ClearWaterBoxStatus,
|
|
@@ -48,7 +49,6 @@ from .v1_code_mappings import (
|
|
|
48
49
|
RoborockDockDustCollectionModeCode,
|
|
49
50
|
RoborockDockErrorCode,
|
|
50
51
|
RoborockDockTypeCode,
|
|
51
|
-
RoborockDockWashTowelModeCode,
|
|
52
52
|
RoborockErrorCode,
|
|
53
53
|
RoborockFanPowerCode,
|
|
54
54
|
RoborockFanSpeedP10,
|
|
@@ -750,7 +750,7 @@ class DustCollectionMode(RoborockBase):
|
|
|
750
750
|
|
|
751
751
|
@dataclass
|
|
752
752
|
class WashTowelMode(RoborockBase):
|
|
753
|
-
wash_mode:
|
|
753
|
+
wash_mode: WashTowelModes | None = None
|
|
754
754
|
|
|
755
755
|
|
|
756
756
|
@dataclass
|
|
@@ -234,6 +234,12 @@ class PropertiesApi(Trait):
|
|
|
234
234
|
# Dock type also acts like a device feature for some traits.
|
|
235
235
|
dock_type = await self._dock_type()
|
|
236
236
|
|
|
237
|
+
# Initialize traits with special arguments before the generic loop
|
|
238
|
+
if self.wash_towel_mode is None and self._is_supported(WashTowelModeTrait, "wash_towel_mode", dock_type):
|
|
239
|
+
wash_towel_mode = WashTowelModeTrait(self.device_features)
|
|
240
|
+
wash_towel_mode._rpc_channel = self._get_rpc_channel(wash_towel_mode) # type: ignore[assignment]
|
|
241
|
+
self.wash_towel_mode = wash_towel_mode
|
|
242
|
+
|
|
237
243
|
# Dynamically create any traits that need to be populated
|
|
238
244
|
for item in fields(self):
|
|
239
245
|
if (trait := getattr(self, item.name, None)) is not None:
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"""Trait for wash towel mode."""
|
|
2
|
+
|
|
3
|
+
from functools import cached_property
|
|
4
|
+
from typing import Self
|
|
5
|
+
|
|
6
|
+
from roborock.data import WashTowelMode, WashTowelModes, get_wash_towel_modes
|
|
7
|
+
from roborock.device_features import is_wash_n_fill_dock
|
|
8
|
+
from roborock.devices.traits.v1 import common
|
|
9
|
+
from roborock.devices.traits.v1.device_features import DeviceFeaturesTrait
|
|
10
|
+
from roborock.roborock_typing import RoborockCommand
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class WashTowelModeTrait(WashTowelMode, common.V1TraitMixin):
|
|
14
|
+
"""Trait for wash towel mode."""
|
|
15
|
+
|
|
16
|
+
command = RoborockCommand.GET_WASH_TOWEL_MODE
|
|
17
|
+
requires_dock_type = is_wash_n_fill_dock
|
|
18
|
+
|
|
19
|
+
def __init__(
|
|
20
|
+
self,
|
|
21
|
+
device_feature_trait: DeviceFeaturesTrait,
|
|
22
|
+
) -> None:
|
|
23
|
+
super().__init__()
|
|
24
|
+
self.device_feature_trait = device_feature_trait
|
|
25
|
+
|
|
26
|
+
def _parse_response(self, response: common.V1ResponseData) -> Self:
|
|
27
|
+
"""Parse the response from the device into a WashTowelMode object."""
|
|
28
|
+
if isinstance(response, list):
|
|
29
|
+
response = response[0]
|
|
30
|
+
if isinstance(response, dict):
|
|
31
|
+
return WashTowelMode.from_dict(response)
|
|
32
|
+
raise ValueError(f"Unexpected wash towel mode format: {response!r}")
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def wash_towel_mode_options(self) -> list[WashTowelModes]:
|
|
36
|
+
return get_wash_towel_modes(self.device_feature_trait)
|
|
37
|
+
|
|
38
|
+
async def set_wash_towel_mode(self, mode: WashTowelModes) -> None:
|
|
39
|
+
"""Set the wash towel mode."""
|
|
40
|
+
await self.rpc_channel.send_command(RoborockCommand.SET_WASH_TOWEL_MODE, params={"wash_mode": mode.code})
|
|
41
|
+
|
|
42
|
+
async def start_wash(self) -> None:
|
|
43
|
+
"""Start washing the mop."""
|
|
44
|
+
await self.rpc_channel.send_command(RoborockCommand.APP_START_WASH)
|
|
45
|
+
|
|
46
|
+
async def stop_wash(self) -> None:
|
|
47
|
+
"""Stop washing the mop."""
|
|
48
|
+
await self.rpc_channel.send_command(RoborockCommand.APP_STOP_WASH)
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"""Trait for wash towel mode."""
|
|
2
|
-
|
|
3
|
-
from roborock.data import WashTowelMode
|
|
4
|
-
from roborock.device_features import is_wash_n_fill_dock
|
|
5
|
-
from roborock.devices.traits.v1 import common
|
|
6
|
-
from roborock.roborock_typing import RoborockCommand
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class WashTowelModeTrait(WashTowelMode, common.V1TraitMixin):
|
|
10
|
-
"""Trait for wash towel mode."""
|
|
11
|
-
|
|
12
|
-
command = RoborockCommand.GET_WASH_TOWEL_MODE
|
|
13
|
-
requires_dock_type = is_wash_n_fill_dock
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q10/b01_q10_code_mappings.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q10/b01_q10_containers.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/data/b01_q7/b01_q7_code_mappings.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/__init__.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q10/command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q7/__init__.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/b01/q7/clean_summary.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/clean_summary.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/device_features.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/do_not_disturb.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/dust_collection_mode.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/flow_led_status.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/network_info.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/traits/v1/smart_wash_params.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/transport/local_channel.py
RENAMED
|
File without changes
|
{python_roborock-4.20.0 → python_roborock-4.21.0}/roborock/devices/transport/mqtt_channel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|