Skip to content

Commit 48e751d

Browse files
committed
Refactor: Rename and reorder YXFanLevel enum members and update corresponding test assertions.
1 parent 7a61bfa commit 48e751d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

roborock/data/b01_q10/b01_q10_code_mappings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ class B01_Q10_DP(RoborockModeEnum):
120120

121121
class YXFanLevel(RoborockModeEnum):
122122
UNKNOWN = "unknown", -1
123-
CLOSE = "close", 0
123+
OFF = "off", 0
124124
QUIET = "quiet", 1
125-
NORMAL = "normal", 2
126-
STRONG = "strong", 3
125+
BALANCED = "balanced", 2
126+
TURBO = "turbo", 3
127127
MAX = "max", 4
128-
SUPER = "super", 8
128+
MAX_PLUS = "max_plus", 5
129129

130130

131131
class YXWaterLevel(RoborockModeEnum):

tests/devices/traits/b01/q10/test_status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ async def test_status_trait_refresh(
139139
# Verify trait attributes are updated
140140
assert q10_api.status.battery == 100
141141
assert q10_api.status.status == YXDeviceState.CHARGING_STATE
142-
assert q10_api.status.fan_level == YXFanLevel.NORMAL
142+
assert q10_api.status.fan_level == YXFanLevel.BALANCED
143143

144144

145145
def test_status_trait_update_listener(q10_api: Q10PropertiesApi) -> None:

tests/devices/traits/b01/q10/test_vacuum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def vacuumm_fixture(q10_api: Q10PropertiesApi) -> VacuumTrait:
3535
(lambda x: x.return_to_dock(), {"203": {}}),
3636
(lambda x: x.empty_dustbin(), {"203": 2}),
3737
(lambda x: x.set_clean_mode(YXCleanType.BOTH_WORK), {"137": 1}),
38-
(lambda x: x.set_fan_level(YXFanLevel.NORMAL), {"123": 2}),
38+
(lambda x: x.set_fan_level(YXFanLevel.BALANCED), {"123": 2}),
3939
],
4040
)
4141
async def test_vacuum_commands(

0 commit comments

Comments
 (0)