From b14e926c036a23f29e9d1338274e2b23122a2049 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sun, 15 Mar 2026 21:37:42 -0700 Subject: [PATCH 1/4] chore: Rename and reorder `YXFanLevel` enum members --- roborock/data/b01_q10/b01_q10_code_mappings.py | 8 ++++---- tests/devices/traits/b01/q10/test_status.py | 2 +- tests/devices/traits/b01/q10/test_vacuum.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/roborock/data/b01_q10/b01_q10_code_mappings.py b/roborock/data/b01_q10/b01_q10_code_mappings.py index abadb9de..38e4c5c1 100644 --- a/roborock/data/b01_q10/b01_q10_code_mappings.py +++ b/roborock/data/b01_q10/b01_q10_code_mappings.py @@ -120,12 +120,12 @@ class B01_Q10_DP(RoborockModeEnum): class YXFanLevel(RoborockModeEnum): UNKNOWN = "unknown", -1 - CLOSE = "close", 0 + OFF = "off", 0 QUIET = "quiet", 1 - NORMAL = "normal", 2 - STRONG = "strong", 3 + BALANCED = "balanced", 2 + TURBO = "turbo", 3 MAX = "max", 4 - SUPER = "super", 8 + MAX_PLUS = "max_plus", 5 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( From f7473a9ec1a613f3fd3cf256f8fd61a3ee3b909c Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Sun, 15 Mar 2026 21:45:56 -0700 Subject: [PATCH 2/4] chore: Fix MAX_PLUS enum value --- roborock/data/b01_q10/b01_q10_code_mappings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roborock/data/b01_q10/b01_q10_code_mappings.py b/roborock/data/b01_q10/b01_q10_code_mappings.py index 38e4c5c1..9bf4971b 100644 --- a/roborock/data/b01_q10/b01_q10_code_mappings.py +++ b/roborock/data/b01_q10/b01_q10_code_mappings.py @@ -125,7 +125,7 @@ class YXFanLevel(RoborockModeEnum): BALANCED = "balanced", 2 TURBO = "turbo", 3 MAX = "max", 4 - MAX_PLUS = "max_plus", 5 + MAX_PLUS = "max_plus", 8 class YXWaterLevel(RoborockModeEnum): From cddf881b3a3ae8cdc67a01431dd78727cb2e1f74 Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Mon, 16 Mar 2026 07:08:36 -0700 Subject: [PATCH 3/4] docs: Add docstring and alias comments to the YXFanLevel enum. --- roborock/data/b01_q10/b01_q10_code_mappings.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/roborock/data/b01_q10/b01_q10_code_mappings.py b/roborock/data/b01_q10/b01_q10_code_mappings.py index 9bf4971b..3f85d024 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 - OFF = "off", 0 + OFF = "off", 0 # close QUIET = "quiet", 1 - BALANCED = "balanced", 2 - TURBO = "turbo", 3 + BALANCED = "balanced", 2 # normal + TURBO = "turbo", 3 # strong MAX = "max", 4 - MAX_PLUS = "max_plus", 8 + MAX_PLUS = "max_plus", 8 # super class YXWaterLevel(RoborockModeEnum): From 833b239c6be38454dbfee5e82a38fc58df83c20a Mon Sep 17 00:00:00 2001 From: Allen Porter Date: Mon, 16 Mar 2026 07:15:05 -0700 Subject: [PATCH 4/4] chore: fix lint. --- roborock/data/b01_q10/b01_q10_code_mappings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roborock/data/b01_q10/b01_q10_code_mappings.py b/roborock/data/b01_q10/b01_q10_code_mappings.py index 3f85d024..aef65c5a 100644 --- a/roborock/data/b01_q10/b01_q10_code_mappings.py +++ b/roborock/data/b01_q10/b01_q10_code_mappings.py @@ -122,7 +122,7 @@ 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. + have different aliases in the app bundles. """ UNKNOWN = "unknown", -1