python-roborock 2.2.1__tar.gz → 2.2.3__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-2.2.1 → python_roborock-2.2.3}/PKG-INFO +1 -1
- {python_roborock-2.2.1 → python_roborock-2.2.3}/pyproject.toml +1 -1
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/code_mappings.py +1 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/roborock_client_v1.py +20 -1
- {python_roborock-2.2.1 → python_roborock-2.2.3}/LICENSE +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/README.md +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/__init__.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/api.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/cli.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/cloud_api.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/command_cache.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/const.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/containers.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/exceptions.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/local_api.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/protocol.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/py.typed +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/roborock_future.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/roborock_message.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/roborock_typing.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/util.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/__init__.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/roborock_local_client_v1.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/roborock_mqtt_client_v1.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_a01_apis/__init__.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_a01_apis/roborock_client_a01.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_a01_apis/roborock_mqtt_client_a01.py +0 -0
- {python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/web_api.py +0 -0
{python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/roborock_client_v1.py
RENAMED
|
@@ -65,6 +65,7 @@ WASH_N_FILL_DOCK = [
|
|
|
65
65
|
RoborockDockTypeCode.empty_wash_fill_dock,
|
|
66
66
|
RoborockDockTypeCode.s8_dock,
|
|
67
67
|
RoborockDockTypeCode.p10_dock,
|
|
68
|
+
RoborockDockTypeCode.s8_maxv_ultra_dock,
|
|
68
69
|
]
|
|
69
70
|
RT = TypeVar("RT", bound=RoborockBase)
|
|
70
71
|
EVICT_TIME = 60
|
|
@@ -197,6 +198,24 @@ class RoborockClientV1(RoborockClient):
|
|
|
197
198
|
if isinstance(record, dict):
|
|
198
199
|
return CleanRecord.from_dict(record)
|
|
199
200
|
elif isinstance(record, list):
|
|
201
|
+
if isinstance(record[-1], dict):
|
|
202
|
+
records = [CleanRecord.from_dict(rec) for rec in record]
|
|
203
|
+
final_record = records[-1]
|
|
204
|
+
try:
|
|
205
|
+
# This code is semi-presumptions - so it is put in a try finally to be safe.
|
|
206
|
+
final_record.begin = records[0].begin
|
|
207
|
+
final_record.begin_datetime = records[0].begin_datetime
|
|
208
|
+
final_record.start_type = records[0].start_type
|
|
209
|
+
for rec in records[0:-1]:
|
|
210
|
+
final_record.duration += rec.duration if rec.duration is not None else 0
|
|
211
|
+
final_record.area += rec.area if rec.area is not None else 0
|
|
212
|
+
final_record.avoid_count += rec.avoid_count if rec.avoid_count is not None else 0
|
|
213
|
+
final_record.wash_count += rec.wash_count if rec.wash_count is not None else 0
|
|
214
|
+
final_record.square_meter_area += (
|
|
215
|
+
rec.square_meter_area if rec.square_meter_area is not None else 0
|
|
216
|
+
)
|
|
217
|
+
finally:
|
|
218
|
+
return final_record
|
|
200
219
|
# There are still a few unknown variables in this.
|
|
201
220
|
begin, end, duration, area = unpack_list(record, 4)
|
|
202
221
|
return CleanRecord(begin=begin, end=end, duration=duration, area=area)
|
|
@@ -277,7 +296,7 @@ class RoborockClientV1(RoborockClient):
|
|
|
277
296
|
"""Gets the mapping from segment id -> iot id. Only works on local api."""
|
|
278
297
|
mapping: list = await self.send_command(RoborockCommand.GET_ROOM_MAPPING)
|
|
279
298
|
if isinstance(mapping, list):
|
|
280
|
-
if not isinstance(mapping[0], list)
|
|
299
|
+
if len(mapping) == 2 and not isinstance(mapping[0], list):
|
|
281
300
|
return [RoomMapping(segment_id=mapping[0], iot_id=mapping[1])]
|
|
282
301
|
return [
|
|
283
302
|
RoomMapping(segment_id=segment_id, iot_id=iot_id) # type: ignore
|
|
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-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/roborock_local_client_v1.py
RENAMED
|
File without changes
|
{python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_1_apis/roborock_mqtt_client_v1.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_roborock-2.2.1 → python_roborock-2.2.3}/roborock/version_a01_apis/roborock_client_a01.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|