Skip to content

Commit c630022

Browse files
authored
feat(api)!: rename YXWaterLevel enum values to mirror v1 values (#796)
1 parent 0c2c781 commit c630022

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

roborock/data/b01_q10/b01_q10_code_mappings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ class YXFanLevel(RoborockModeEnum):
136136

137137
class YXWaterLevel(RoborockModeEnum):
138138
UNKNOWN = "unknown", -1
139-
CLOSE = "close", 0
139+
OFF = "off", 0 # close
140140
LOW = "low", 1
141-
MIDDLE = "middle", 2
141+
MEDIUM = "medium", 2 # middle
142142
HIGH = "high", 3
143143

144144

tests/protocols/test_b01_q10_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_decode_unknown_dps_code() -> None:
9797
(B01_Q10_DP.REQUEST_DPS, {}),
9898
(B01_Q10_DP.REQUEST_DPS, None),
9999
(B01_Q10_DP.START_CLEAN, {"cmd": 1}),
100-
(B01_Q10_DP.WATER_LEVEL, YXWaterLevel.MIDDLE.code),
100+
(B01_Q10_DP.WATER_LEVEL, YXWaterLevel.MEDIUM.code),
101101
],
102102
)
103103
def test_encode_mqtt_payload(command: B01_Q10_DP, params: dict[str, Any], snapshot) -> None:

0 commit comments

Comments
 (0)