python-roborock 7.4.0__py3-none-any.whl → 7.4.2__py3-none-any.whl
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-7.4.0.dist-info → python_roborock-7.4.2.dist-info}/METADATA +1 -1
- {python_roborock-7.4.0.dist-info → python_roborock-7.4.2.dist-info}/RECORD +7 -7
- roborock/devices/traits/a01/device_feature.py +18 -0
- roborock/map/map_parser.py +1 -57
- {python_roborock-7.4.0.dist-info → python_roborock-7.4.2.dist-info}/WHEEL +0 -0
- {python_roborock-7.4.0.dist-info → python_roborock-7.4.2.dist-info}/entry_points.txt +0 -0
- {python_roborock-7.4.0.dist-info → python_roborock-7.4.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: python-roborock
|
|
3
|
-
Version: 7.4.
|
|
3
|
+
Version: 7.4.2
|
|
4
4
|
Summary: A package to control Roborock vacuums.
|
|
5
5
|
Project-URL: Repository, https://github.com/python-roborock/python-roborock
|
|
6
6
|
Project-URL: Documentation, https://python-roborock.readthedocs.io/
|
|
@@ -49,7 +49,7 @@ roborock/devices/traits/__init__.py,sha256=YaL9qoxG6IBG0XXDP0HMTvoc0Jkmq7AF6iH2o
|
|
|
49
49
|
roborock/devices/traits/common.py,sha256=n3fHK4i4bkTU1QL7skMStJiUPIDlpN37z0T9mPQYoOY,4588
|
|
50
50
|
roborock/devices/traits/traits_mixin.py,sha256=7t15l_Ty1cN-3-fKNtRH1XR6-mfadPnTBCQRZP4rAtc,2092
|
|
51
51
|
roborock/devices/traits/a01/__init__.py,sha256=rRrdXgSsolyNC6MOCyYIfW8oaUmzt-p_uppuhzfYYIU,18375
|
|
52
|
-
roborock/devices/traits/a01/device_feature.py,sha256=
|
|
52
|
+
roborock/devices/traits/a01/device_feature.py,sha256=tO7u1dvnwerj9IVq9je-p7tzyEqTQR7i59DEj57eHZk,14117
|
|
53
53
|
roborock/devices/traits/b01/__init__.py,sha256=pGN6wEocE6Fr2BTasG8Z_75crD6OdTwpju59Vw7eTDk,202
|
|
54
54
|
roborock/devices/traits/b01/q10/__init__.py,sha256=BpeCO7vrM11ISy8JZwBiSkHsTs5-vp68c9YwnWKEIDk,6747
|
|
55
55
|
roborock/devices/traits/b01/q10/button_light.py,sha256=_CCWSjFe_iZnnSXgBHOju31VUmwG1KKd_jGkmSpLew4,994
|
|
@@ -104,7 +104,7 @@ roborock/map/b01_map_parser.py,sha256=tTeeWH4fA4Pv4DvqN7PBQs92DuWTaD2rvD44Mo_t3O
|
|
|
104
104
|
roborock/map/b01_q10_map_parser.py,sha256=EQMx2ZNVjHKsmKr6vR8JS7o86IZu85dNg3bKi5S0ZYw,29985
|
|
105
105
|
roborock/map/b01_q10_overlays.py,sha256=JmriUbT4-oe6NiE94VttMplFc1HHQrAGNQIiZHj5QKk,6640
|
|
106
106
|
roborock/map/b01_q10_render.py,sha256=b7YUBr53WXxOJhXbfb5IVmgi82iGcC0lJ_j9Ef3kV7M,13502
|
|
107
|
-
roborock/map/map_parser.py,sha256=
|
|
107
|
+
roborock/map/map_parser.py,sha256=EcJcz9yld_wu7d5QrmxR2BTfJ801F6SaEgJkbIIap4w,5111
|
|
108
108
|
roborock/map/room_colors.py,sha256=5Q85oR_7xsUyzHYGOJPuzsZ6LQSCpJwfxfWql1v6T1E,2152
|
|
109
109
|
roborock/map/proto/__init__.py,sha256=XcH_s-E67_hcQNwqSkdtY7DgYE0mRBBJwctzsf8zng4,60
|
|
110
110
|
roborock/map/proto/b01_scmap.proto,sha256=ux1OnI_-LSDOlTujCCUeOJrTsVCvjLAUKfyddu-rH5U,1929
|
|
@@ -125,8 +125,8 @@ roborock/testing/channel.py,sha256=vjulT5MHBe8lAq6XITUqcxJVcCILWx7ZEcw5imTx0Tk,7
|
|
|
125
125
|
roborock/testing/cloud.py,sha256=L2L0KlZDYaMuoV19KUQUoq5EAUDeNQ1lJ8Ew5YaOgjo,11946
|
|
126
126
|
roborock/testing/simulator.py,sha256=g8ZUWVSjgAzuRRxWOCeOq-7deodyEItwUpqEw9RzCmQ,4347
|
|
127
127
|
roborock/testing/v1_simulator.py,sha256=TQ2PsRoP_4kJvVn-Tm532ByHuaCKltsVjvTa2Ju4PAo,14407
|
|
128
|
-
python_roborock-7.4.
|
|
129
|
-
python_roborock-7.4.
|
|
130
|
-
python_roborock-7.4.
|
|
131
|
-
python_roborock-7.4.
|
|
132
|
-
python_roborock-7.4.
|
|
128
|
+
python_roborock-7.4.2.dist-info/METADATA,sha256=2EEnCpez1BS4kd3YAaXGO1fxAZ4y6tBwQ54lzvnB4UI,5278
|
|
129
|
+
python_roborock-7.4.2.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
130
|
+
python_roborock-7.4.2.dist-info/entry_points.txt,sha256=EvC1nMqi9ZXKgZnqlNXA33v_3nzgPNjnM0mzWlrehnY,47
|
|
131
|
+
python_roborock-7.4.2.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
132
|
+
python_roborock-7.4.2.dist-info/RECORD,,
|
|
@@ -143,6 +143,13 @@ _UNSUPPORTED_FEATURE_BITS: frozenset[str] = frozenset(
|
|
|
143
143
|
}
|
|
144
144
|
)
|
|
145
145
|
|
|
146
|
+
# Devices known to lack DEFAULT_SETTING (DP 225).
|
|
147
|
+
_UNSUPPORTED_DEFAULT_SETTING: frozenset[str] = frozenset(
|
|
148
|
+
{
|
|
149
|
+
"roborock.wm.a63", # H1
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
|
|
146
153
|
# Series that support UV light (DP 228).
|
|
147
154
|
_UV_LIGHT_SERIES: frozenset[str] = (
|
|
148
155
|
_H1_LITE_SERIES # a90, a91, a237
|
|
@@ -242,6 +249,13 @@ def supports_feature_bits(model: str | None) -> bool:
|
|
|
242
249
|
return model not in _UNSUPPORTED_FEATURE_BITS
|
|
243
250
|
|
|
244
251
|
|
|
252
|
+
def supports_default_setting(model: str | None) -> bool:
|
|
253
|
+
"""H1 (a63) does not support DP 225 even though it has a softener compartment."""
|
|
254
|
+
if model is None:
|
|
255
|
+
return True # conservative: assume yes
|
|
256
|
+
return model not in _UNSUPPORTED_DEFAULT_SETTING
|
|
257
|
+
|
|
258
|
+
|
|
245
259
|
def supports_remote_control(model: str | None) -> bool:
|
|
246
260
|
"""Remote control (DP 232) is supported on all overseas models."""
|
|
247
261
|
if model is None:
|
|
@@ -309,6 +323,10 @@ def build_force_load_dp_list(model: str | None) -> list[RoborockZeoProtocol]:
|
|
|
309
323
|
if not supports_feature_bits(model):
|
|
310
324
|
base = [dp for dp in base if dp != RoborockZeoProtocol.FEATURE_BITS]
|
|
311
325
|
|
|
326
|
+
# ── Strip unsupported DEFAULT_SETTING ──
|
|
327
|
+
if not supports_default_setting(model):
|
|
328
|
+
base = [dp for dp in base if dp != RoborockZeoProtocol.DEFAULT_SETTING]
|
|
329
|
+
|
|
312
330
|
return base
|
|
313
331
|
|
|
314
332
|
|
roborock/map/map_parser.py
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
import io
|
|
4
4
|
import logging
|
|
5
|
-
import threading
|
|
6
5
|
from dataclasses import dataclass, field
|
|
7
6
|
|
|
8
7
|
from vacuum_map_parser_base.config.color import Color, ColorsPalette, SupportedColor
|
|
@@ -11,13 +10,10 @@ from vacuum_map_parser_base.config.image_config import ImageConfig
|
|
|
11
10
|
from vacuum_map_parser_base.config.size import Size, Sizes
|
|
12
11
|
from vacuum_map_parser_base.image_generator import ImageGenerator
|
|
13
12
|
from vacuum_map_parser_base.map_data import MapData
|
|
14
|
-
from vacuum_map_parser_roborock.image_parser import RoborockImageParser
|
|
15
13
|
from vacuum_map_parser_roborock.map_data_parser import RoborockMapDataParser
|
|
16
14
|
|
|
17
15
|
from roborock.exceptions import RoborockException
|
|
18
16
|
|
|
19
|
-
from .room_colors import adjacency_aware_room_colors
|
|
20
|
-
|
|
21
17
|
_LOGGER = logging.getLogger(__name__)
|
|
22
18
|
|
|
23
19
|
DEFAULT_DRAWABLES = {
|
|
@@ -103,68 +99,16 @@ class MapParser:
|
|
|
103
99
|
return ParsedMapData(image_content=img_byte_arr.getvalue(), map_data=parsed_map)
|
|
104
100
|
|
|
105
101
|
|
|
106
|
-
class _AdjacencyAwareRoborockImageParser(RoborockImageParser):
|
|
107
|
-
"""Apply the shared adjacency color policy to V1 room cells."""
|
|
108
|
-
|
|
109
|
-
def __init__(
|
|
110
|
-
self,
|
|
111
|
-
palette: ColorsPalette,
|
|
112
|
-
image_config: ImageConfig,
|
|
113
|
-
*,
|
|
114
|
-
recolor_rooms: bool = True,
|
|
115
|
-
) -> None:
|
|
116
|
-
super().__init__(palette, image_config)
|
|
117
|
-
self._room_palette = palette
|
|
118
|
-
self._base_room_colors = palette.cached_room_colors.copy()
|
|
119
|
-
self._recolor_rooms = recolor_rooms
|
|
120
|
-
self._palette_lock = threading.Lock()
|
|
121
|
-
|
|
122
|
-
def parse(
|
|
123
|
-
self,
|
|
124
|
-
raw_data: bytes,
|
|
125
|
-
width: int,
|
|
126
|
-
height: int,
|
|
127
|
-
carpet_map: set[int] | None,
|
|
128
|
-
removed_map: set[int] | None = None,
|
|
129
|
-
):
|
|
130
|
-
"""Assign non-conflicting room colors before the V1 image pass."""
|
|
131
|
-
with self._palette_lock:
|
|
132
|
-
# cached_room_colors is a read-only property, so reset its dict in place.
|
|
133
|
-
cached_room_colors = self._room_palette.cached_room_colors
|
|
134
|
-
cached_room_colors.clear()
|
|
135
|
-
cached_room_colors.update(self._base_room_colors)
|
|
136
|
-
|
|
137
|
-
if self._recolor_rooms:
|
|
138
|
-
|
|
139
|
-
def room_id(value: int) -> int | None:
|
|
140
|
-
if value in (self.MAP_OUTSIDE, self.MAP_WALL, self.MAP_INSIDE, self.MAP_SCAN):
|
|
141
|
-
return None
|
|
142
|
-
return self._get_room_number(value) if value & 0x07 == 0x07 else None
|
|
143
|
-
|
|
144
|
-
room_colors = adjacency_aware_room_colors(raw_data, width, self._room_palette, room_id)
|
|
145
|
-
for number, color in room_colors.items():
|
|
146
|
-
# ColorsPalette caches both forms for get_room_color(str | int).
|
|
147
|
-
cached_room_colors[number] = color
|
|
148
|
-
cached_room_colors[str(number)] = color
|
|
149
|
-
return super().parse(raw_data, width, height, carpet_map, removed_map)
|
|
150
|
-
|
|
151
|
-
|
|
152
102
|
def _create_map_data_parser(config: MapParserConfig) -> RoborockMapDataParser:
|
|
153
103
|
"""Create a RoborockMapDataParser based on the config entry."""
|
|
154
104
|
palette, sizes, image_config = _create_rendering_components(config)
|
|
155
|
-
|
|
105
|
+
return RoborockMapDataParser(
|
|
156
106
|
palette,
|
|
157
107
|
sizes,
|
|
158
108
|
config.drawables,
|
|
159
109
|
image_config,
|
|
160
110
|
[],
|
|
161
111
|
)
|
|
162
|
-
parser._image_parser = _AdjacencyAwareRoborockImageParser(
|
|
163
|
-
palette,
|
|
164
|
-
image_config,
|
|
165
|
-
recolor_rooms=config.show_rooms,
|
|
166
|
-
)
|
|
167
|
-
return parser
|
|
168
112
|
|
|
169
113
|
|
|
170
114
|
def _create_image_generator(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|