Skip to content

Commit a4fbe97

Browse files
Merge branch 'main' into vc/q10-map-refresh
2 parents 6c667d5 + 347a8f6 commit a4fbe97

20 files changed

Lines changed: 1094 additions & 302 deletions

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,48 @@
22

33
<!-- version list -->
44

5+
## v6.2.0 (2026-07-30)
6+
7+
### Features
8+
9+
- Align Q10 map colors with V1 ([#902](https://github.com/Python-roborock/python-roborock/pull/902),
10+
[`dbb6c46`](https://github.com/Python-roborock/python-roborock/commit/dbb6c4663bcd5a0560d7438b49272ab53b91c4f4))
11+
12+
### Refactoring
13+
14+
- Clarify room palette cache handling
15+
([#902](https://github.com/Python-roborock/python-roborock/pull/902),
16+
[`dbb6c46`](https://github.com/Python-roborock/python-roborock/commit/dbb6c4663bcd5a0560d7438b49272ab53b91c4f4))
17+
18+
19+
## v6.1.0 (2026-07-30)
20+
21+
### Features
22+
23+
- Use display name to fix duplicate code mappings
24+
([#870](https://github.com/Python-roborock/python-roborock/pull/870),
25+
[`d0a99c2`](https://github.com/Python-roborock/python-roborock/commit/d0a99c28e65d6c1bc6bc00852b261d4a82b3feb7))
26+
27+
28+
## v6.0.0 (2026-07-27)
29+
30+
### Features
31+
32+
- Audit and complete Zeo protocol DP and enum mappings
33+
([#892](https://github.com/Python-roborock/python-roborock/pull/892),
34+
[`dba564d`](https://github.com/Python-roborock/python-roborock/commit/dba564d10b88afcd6195298b90c6d49844e334f5))
35+
36+
- Full Zeo protocol definition — 67 DPs, complete enum mappings, all 56 devices covered
37+
([#892](https://github.com/Python-roborock/python-roborock/pull/892),
38+
[`dba564d`](https://github.com/Python-roborock/python-roborock/commit/dba564d10b88afcd6195298b90c6d49844e334f5))
39+
40+
### Refactoring
41+
42+
- **zeo**: Replace raw integer fields with enum types
43+
([#892](https://github.com/Python-roborock/python-roborock/pull/892),
44+
[`dba564d`](https://github.com/Python-roborock/python-roborock/commit/dba564d10b88afcd6195298b90c6d49844e334f5))
45+
46+
547
## v5.37.1 (2026-07-25)
648

749
### Bug Fixes

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "python-roborock"
3-
version = "5.37.1"
3+
version = "6.2.0"
44
description = "A package to control Roborock vacuums."
55
authors = [{ name = "humbertogontijo", email = "humbertogontijo@users.noreply.github.com" }, {name="Lash-L"}, {name="allenporter"}]
66
requires-python = ">=3.11, <4"

roborock/data/code_mappings.py

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,22 @@
1010
class RoborockEnum(IntEnum):
1111
"""Roborock Enum for codes with int values"""
1212

13+
_display_name_: str | None
14+
15+
def __new__(cls, value: int, display_name: str | None = None) -> Self:
16+
member = int.__new__(cls, value)
17+
member._value_ = value
18+
member._display_name_ = display_name
19+
return member
20+
1321
@property
1422
def name(self) -> str:
1523
return super().name.lower()
1624

25+
@property
26+
def display_name(self) -> str:
27+
return self._display_name_ or self.name
28+
1729
@classmethod
1830
def _missing_(cls: type[Self], key) -> Self:
1931
if hasattr(cls, "unknown"):
@@ -30,8 +42,13 @@ def _missing_(cls: type[Self], key) -> Self:
3042
return default_value
3143

3244
@classmethod
33-
def as_dict(cls: type[Self]):
34-
return {i.name: i.value for i in cls if i.name != "missing"}
45+
def as_dict(cls: type[Self]) -> dict[str, int]:
46+
result: dict[str, int] = {}
47+
for item in cls:
48+
if item.name == "missing":
49+
continue
50+
result.setdefault(item.display_name, item.value)
51+
return result
3552

3653
@classmethod
3754
def as_enum_dict(cls: type[Self]):

roborock/data/dyad/dyad_code_mappings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class DyadError(RoborockEnum):
9595
battery_temperature_protection = (
9696
20007 # Battery temperature protection. Wait for the temperature to return to a normal range.
9797
)
98-
battery_temperature_protection_2 = 20008
98+
battery_temperature_protection_2 = (20008, "battery_temperature_protection")
9999
power_adapter_error = 20009 # Check if the power adapter is working properly.
100100
dirty_charging_contacts = 10007 # Disconnection between the device and dock. Wipe charging contacts.
101101
low_battery = 20017 # Low battery level. Charge before starting self-cleaning.

roborock/data/v1/v1_code_mappings.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,40 @@ class RoborockFinishReason(RoborockEnum):
88
manual_interrupt = 21 # Cleaning interrupted by user
99
cleanup_interrupted = 24 # Cleanup interrupted
1010
manual_interrupt_2 = 21
11-
manual_interrupt_12 = 29
11+
manual_interrupt_12 = (29, "manual_interrupt")
1212
breakpoint = 32 # Could not continue cleaning
13-
breakpoint_2 = 33
14-
cleanup_interrupted_2 = 34
15-
manual_interrupt_3 = 35
16-
manual_interrupt_4 = 36
17-
manual_interrupt_5 = 37
18-
manual_interrupt_6 = 43
13+
breakpoint_2 = (33, "breakpoint")
14+
cleanup_interrupted_2 = (34, "cleanup_interrupted")
15+
manual_interrupt_3 = (35, "manual_interrupt")
16+
manual_interrupt_4 = (36, "manual_interrupt")
17+
manual_interrupt_5 = (37, "manual_interrupt")
18+
manual_interrupt_6 = (43, "manual_interrupt")
1919
locate_fail = 45 # Positioning Failed
20-
cleanup_interrupted_3 = 64
21-
locate_fail_2 = 65
22-
manual_interrupt_7 = 48
23-
manual_interrupt_8 = 49
24-
manual_interrupt_9 = 50
25-
cleanup_interrupted_4 = 51
20+
cleanup_interrupted_3 = (64, "cleanup_interrupted")
21+
locate_fail_2 = (65, "locate_fail")
22+
manual_interrupt_7 = (48, "manual_interrupt")
23+
manual_interrupt_8 = (49, "manual_interrupt")
24+
manual_interrupt_9 = (50, "manual_interrupt")
25+
cleanup_interrupted_4 = (51, "cleanup_interrupted")
2626
finished_cleaning = 52 # Finished cleaning
27-
finished_cleaning_2 = 54
28-
finished_cleaning_3 = 55
29-
finished_cleaning_4 = 56
30-
finished_clenaing_5 = 57
31-
manual_interrupt_10 = 60
27+
finished_cleaning_2 = (54, "finished_cleaning")
28+
finished_cleaning_3 = (55, "finished_cleaning")
29+
finished_cleaning_4 = (56, "finished_cleaning")
30+
finished_clenaing_5 = (57, "finished_cleaning")
31+
manual_interrupt_10 = (60, "manual_interrupt")
3232
area_unreachable = 61 # Area unreachable
33-
area_unreachable_2 = 62
33+
area_unreachable_2 = (62, "area_unreachable")
3434
washing_error = 67 # Washing error
3535
back_to_wash_failure = 68 # Failed to return to the dock
36-
cleanup_interrupted_5 = 101
37-
breakpoint_4 = 102
38-
manual_interrupt_11 = 103
39-
cleanup_interrupted_6 = 104
40-
cleanup_interrupted_7 = 105
41-
cleanup_interrupted_8 = 106
42-
cleanup_interrupted_9 = 107
43-
cleanup_interrupted_10 = 109
44-
cleanup_interrupted_11 = 110
36+
cleanup_interrupted_5 = (101, "cleanup_interrupted")
37+
breakpoint_4 = (102, "breakpoint")
38+
manual_interrupt_11 = (103, "manual_interrupt")
39+
cleanup_interrupted_6 = (104, "cleanup_interrupted")
40+
cleanup_interrupted_7 = (105, "cleanup_interrupted")
41+
cleanup_interrupted_8 = (106, "cleanup_interrupted")
42+
cleanup_interrupted_9 = (107, "cleanup_interrupted")
43+
cleanup_interrupted_10 = (109, "cleanup_interrupted")
44+
cleanup_interrupted_11 = (110, "cleanup_interrupted")
4545
patrol_success = 114 # Cruise completed
4646
patrol_fail = 115 # Cruise failed
4747
pet_patrol_success = 116 # Pet found
@@ -159,7 +159,7 @@ class ClearWaterBoxStatus(RoborockDssCodes):
159159

160160
okay = 0
161161
out_of_water = 1
162-
out_of_water_2 = 38
162+
out_of_water_2 = (38, "out_of_water")
163163
refill_error = 48
164164

165165

@@ -168,7 +168,7 @@ class DirtyWaterBoxStatus(RoborockDssCodes):
168168

169169
okay = 0
170170
full_not_installed = 1
171-
full_not_installed_2 = 39
171+
full_not_installed_2 = (39, "full_not_installed")
172172
drain_error = 49
173173

174174

@@ -232,7 +232,7 @@ class RoborockErrorCode(RoborockEnum):
232232
clear_brush_exception = 42 # Check that the water filter has been correctly installed
233233
clear_brush_exception_2 = 43 # Positioning button error
234234
filter_screen_exception = 44 # Clean the dock water filter
235-
mopping_roller_2 = 45 # Wash roller may be jammed
235+
mopping_roller_2 = (45, "mopping_roller_1") # Wash roller may be jammed
236236
up_water_exception = 48
237237
drain_water_exception = 49
238238
temperature_protection = 51 # Unit temperature protection
@@ -421,7 +421,7 @@ class RoborockStateCode(RoborockEnum):
421421
segment_cleaning = 18
422422
emptying_the_bin = 22 # on s7+
423423
washing_the_mop = 23 # on a46
424-
washing_the_mop_2 = 25
424+
washing_the_mop_2 = (25, "washing_the_mop")
425425
going_to_wash_the_mop = 26 # on a46
426426
in_call = 28
427427
mapping = 29

roborock/data/v1/v1_containers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ def square_meter_clean_area(self) -> float | None:
144144

145145
@property
146146
def error_code_name(self) -> str | None:
147-
return self.error_code.name if self.error_code is not None else None
147+
return self.error_code.display_name if self.error_code is not None else None
148148

149149
@property
150150
def state_name(self) -> str | None:
151-
return self.state.name if self.state is not None else None
151+
return self.state.display_name if self.state is not None else None
152152

153153
@property
154154
def current_map(self) -> int | None:

0 commit comments

Comments
 (0)