diff --git a/roborock/data/b01_q10/b01_q10_code_mappings.py b/roborock/data/b01_q10/b01_q10_code_mappings.py index abadb9de..aef65c5a 100644 --- a/roborock/data/b01_q10/b01_q10_code_mappings.py +++ b/roborock/data/b01_q10/b01_q10_code_mappings.py @@ -119,13 +119,19 @@ class B01_Q10_DP(RoborockModeEnum): class YXFanLevel(RoborockModeEnum): + """The fan or vacuum level of the robot. + + Note: The names used here are the v1 names, though the values + have different aliases in the app bundles. + """ + UNKNOWN = "unknown", -1 - CLOSE = "close", 0 + OFF = "off", 0 # close QUIET = "quiet", 1 - NORMAL = "normal", 2 - STRONG = "strong", 3 + BALANCED = "balanced", 2 # normal + TURBO = "turbo", 3 # strong MAX = "max", 4 - SUPER = "super", 8 + MAX_PLUS = "max_plus", 8 # super class YXWaterLevel(RoborockModeEnum): diff --git a/tests/devices/traits/b01/q10/test_status.py b/tests/devices/traits/b01/q10/test_status.py index e295e890..8fbbd19a 100644 --- a/tests/devices/traits/b01/q10/test_status.py +++ b/tests/devices/traits/b01/q10/test_status.py @@ -139,7 +139,7 @@ async def test_status_trait_refresh( # Verify trait attributes are updated assert q10_api.status.battery == 100 assert q10_api.status.status == YXDeviceState.CHARGING_STATE - assert q10_api.status.fan_level == YXFanLevel.NORMAL + assert q10_api.status.fan_level == YXFanLevel.BALANCED def test_status_trait_update_listener(q10_api: Q10PropertiesApi) -> None: diff --git a/tests/devices/traits/b01/q10/test_vacuum.py b/tests/devices/traits/b01/q10/test_vacuum.py index c8bdb3a4..8e271c7c 100644 --- a/tests/devices/traits/b01/q10/test_vacuum.py +++ b/tests/devices/traits/b01/q10/test_vacuum.py @@ -35,7 +35,7 @@ def vacuumm_fixture(q10_api: Q10PropertiesApi) -> VacuumTrait: (lambda x: x.return_to_dock(), {"203": {}}), (lambda x: x.empty_dustbin(), {"203": 2}), (lambda x: x.set_clean_mode(YXCleanType.BOTH_WORK), {"137": 1}), - (lambda x: x.set_fan_level(YXFanLevel.NORMAL), {"123": 2}), + (lambda x: x.set_fan_level(YXFanLevel.BALANCED), {"123": 2}), ], ) async def test_vacuum_commands(