From 74294f40859fdb2ba931ad51c2a563b3ef4b689d Mon Sep 17 00:00:00 2001 From: phntom Date: Thu, 23 Jul 2026 19:31:12 +0300 Subject: [PATCH] fix(T0xE1): send codec-native dishwasher program modes The explicit T0xE1 profiles pass *_wash names to a Lua encoder that only accepts values such as normal, eco, glass, and rapid. Unknown values fall back to ECO, so selecting most programs starts the wrong cycle. Keep the existing Home Assistant option keys, map their payloads to the codec vocabulary across all affected explicit profiles, and remove options the codec cannot encode. --- .../midea_auto_cloud/device_mapping/T0xE1.py | 115 +++++++----------- 1 file changed, 46 insertions(+), 69 deletions(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xE1.py b/custom_components/midea_auto_cloud/device_mapping/T0xE1.py index a664856..44437c1 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xE1.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xE1.py @@ -91,28 +91,22 @@ } }, "wash_mode": { + # Keep the existing option keys for translations and automations, + # but send values understood by the device's Lua codec. "options": { - "neutral_gear": {"work_status": "work", "mode": "neutral_gear"}, - "auto_wash": {"work_status": "work", "mode": "auto_wash"}, - "strong_wash": {"work_status": "work", "mode": "strong_wash"}, - "standard_wash": {"work_status": "work", "mode": "standard_wash"}, - "eco_wash": {"work_status": "work", "mode": "eco_wash", "additional": 0, "wash_region": 3}, - "glass_wash": {"work_status": "work", "mode": "glass_wash"}, - "hour_wash": {"work_status": "work", "mode": "hour_wash"}, - "fast_wash": {"work_status": "work", "mode": "fast_wash"}, - "soak_wash": {"work_status": "work", "mode": "soak_wash"}, - "90min_wash": {"work_status": "work", "mode": "90min_wash"}, + "auto_wash": {"work_status": "work", "mode": "auto"}, + "strong_wash": {"work_status": "work", "mode": "intensive"}, + "standard_wash": {"work_status": "work", "mode": "normal"}, + "eco_wash": {"work_status": "work", "mode": "eco"}, + "glass_wash": {"work_status": "work", "mode": "glass"}, + "90min_wash": {"work_status": "work", "mode": "90min"}, + "fast_wash": {"work_status": "work", "mode": "rapid"}, + "soak_wash": {"work_status": "work", "mode": "soak"}, + "hour_wash": {"work_status": "work", "mode": "1hour"}, + "quietnight_wash": {"work_status": "work", "mode": "quiet"}, + "germ": {"work_status": "work", "mode": "hygiene"}, "self_clean": {"work_status": "work", "mode": "self_clean"}, - "fruit_wash": {"work_status": "work", "mode": "fruit_wash"}, - "self_define": {"work_status": "work", "mode": "self_define"}, - "germ": {"work_status": "work", "mode": "germ"}, - "bowl_wash": {"work_status": "work", "mode": "bowl_wash"}, - "kill_germ": {"work_status": "work", "mode": "kill_germ"}, - "seafood_wash": {"work_status": "work", "mode": "seafood_wash"}, - "hotpot_wash": {"work_status": "work", "mode": "hotpot_wash"}, - "quietnight_wash": {"work_status": "work", "mode": "quietnight_wash"}, - "less_wash": {"work_status": "work", "mode": "less_wash"}, - "oilnet_wash": {"work_status": "work", "mode": "oilnet_wash"} + "fruit_wash": {"work_status": "work", "mode": "fruit"}, } } }, @@ -220,27 +214,19 @@ }, "wash_mode": { "options": { - "neutral_gear": {"work_status": "work", "mode": "neutral_gear"}, - "auto_wash": {"work_status": "work", "mode": "auto_wash"}, - "strong_wash": {"work_status": "work", "mode": "strong_wash"}, - "standard_wash": {"work_status": "work", "mode": "standard_wash"}, - "eco_wash": {"work_status": "work", "mode": "eco_wash", "additional": 0, "wash_region": 3}, - "glass_wash": {"work_status": "work", "mode": "glass_wash"}, - "hour_wash": {"work_status": "work", "mode": "hour_wash"}, - "fast_wash": {"work_status": "work", "mode": "fast_wash"}, - "soak_wash": {"work_status": "work", "mode": "soak_wash"}, - "90min_wash": {"work_status": "work", "mode": "90min_wash"}, + "auto_wash": {"work_status": "work", "mode": "auto"}, + "strong_wash": {"work_status": "work", "mode": "intensive"}, + "standard_wash": {"work_status": "work", "mode": "normal"}, + "eco_wash": {"work_status": "work", "mode": "eco"}, + "glass_wash": {"work_status": "work", "mode": "glass"}, + "90min_wash": {"work_status": "work", "mode": "90min"}, + "fast_wash": {"work_status": "work", "mode": "rapid"}, + "soak_wash": {"work_status": "work", "mode": "soak"}, + "hour_wash": {"work_status": "work", "mode": "1hour"}, + "quietnight_wash": {"work_status": "work", "mode": "quiet"}, + "germ": {"work_status": "work", "mode": "hygiene"}, "self_clean": {"work_status": "work", "mode": "self_clean"}, - "fruit_wash": {"work_status": "work", "mode": "fruit_wash"}, - "self_define": {"work_status": "work", "mode": "self_define"}, - "germ": {"work_status": "work", "mode": "germ"}, - "bowl_wash": {"work_status": "work", "mode": "bowl_wash"}, - "kill_germ": {"work_status": "work", "mode": "kill_germ"}, - "seafood_wash": {"work_status": "work", "mode": "seafood_wash"}, - "hotpot_wash": {"work_status": "work", "mode": "hotpot_wash"}, - "quietnight_wash": {"work_status": "work", "mode": "quietnight_wash"}, - "less_wash": {"work_status": "work", "mode": "less_wash"}, - "oilnet_wash": {"work_status": "work", "mode": "oilnet_wash"} + "fruit_wash": {"work_status": "work", "mode": "fruit"}, } } }, @@ -357,27 +343,19 @@ }, "wash_mode": { "options": { - "neutral_gear": {"work_status": "work", "mode": "neutral_gear"}, - "auto_wash": {"work_status": "work", "mode": "auto_wash"}, - "strong_wash": {"work_status": "work", "mode": "strong_wash"}, - "standard_wash": {"work_status": "work", "mode": "standard_wash"}, - "eco_wash": {"work_status":"work","mode":"eco_wash","additional":0,"wash_region":3}, - "glass_wash": {"work_status": "work", "mode": "glass_wash"}, - "hour_wash": {"work_status": "work", "mode": "hour_wash"}, - "fast_wash": {"work_status": "work", "mode": "fast_wash"}, - "soak_wash": {"work_status": "work", "mode": "soak_wash"}, - "90min_wash": {"work_status": "work", "mode": "90min_wash"}, + "auto_wash": {"work_status": "work", "mode": "auto"}, + "strong_wash": {"work_status": "work", "mode": "intensive"}, + "standard_wash": {"work_status": "work", "mode": "normal"}, + "eco_wash": {"work_status": "work", "mode": "eco"}, + "glass_wash": {"work_status": "work", "mode": "glass"}, + "90min_wash": {"work_status": "work", "mode": "90min"}, + "fast_wash": {"work_status": "work", "mode": "rapid"}, + "soak_wash": {"work_status": "work", "mode": "soak"}, + "hour_wash": {"work_status": "work", "mode": "1hour"}, + "quietnight_wash": {"work_status": "work", "mode": "quiet"}, + "germ": {"work_status": "work", "mode": "hygiene"}, "self_clean": {"work_status": "work", "mode": "self_clean"}, - "fruit_wash": {"work_status": "work", "mode": "fruit_wash"}, - "self_define": {"work_status": "work", "mode": "self_define"}, - "germ": {"work_status": "work", "mode": "germ"}, - "bowl_wash": {"work_status": "work", "mode": "bowl_wash"}, - "kill_germ": {"work_status": "work", "mode": "kill_germ"}, - "seafood_wash": {"work_status": "work", "mode": "seafood_wash"}, - "hotpot_wash": {"work_status": "work", "mode": "hotpot_wash"}, - "quietnight_wash": {"work_status": "work", "mode": "quietnight_wash"}, - "less_wash": {"work_status": "work", "mode": "less_wash"}, - "oilnet_wash": {"work_status": "work", "mode": "oilnet_wash"} + "fruit_wash": {"work_status": "work", "mode": "fruit"}, } } }, @@ -443,16 +421,15 @@ }, "wash_mode": { "options": { - "neutral_gear": {"work_status": "work", "mode": "neutral_gear"}, - "auto_wash": {"work_status": "work", "mode": "auto_wash"}, - "strong_wash": {"work_status": "work", "mode": "strong_wash"}, - "standard_wash": {"work_status": "work", "mode": "standard_wash"}, - "eco_wash": {"work_status":"work","mode":"eco_wash","additional":0,"wash_region":3}, - "soft_wash": {"work_status": "work", "mode": "glass_wash"}, - "fast_wash": {"work_status": "work", "mode": "fast_wash"}, - "soak_wash": {"work_status": "work", "mode": "soak_wash"}, + "auto_wash": {"work_status": "work", "mode": "auto"}, + "strong_wash": {"work_status": "work", "mode": "intensive"}, + "standard_wash": {"work_status": "work", "mode": "normal"}, + "eco_wash": {"work_status": "work", "mode": "eco"}, + "soft_wash": {"work_status": "work", "mode": "glass"}, + "fast_wash": {"work_status": "work", "mode": "rapid"}, + "soak_wash": {"work_status": "work", "mode": "soak"}, "self_clean": {"work_status": "work", "mode": "self_clean"}, - "fruit_wash": {"work_status": "work", "mode": "fruit_wash"} + "fruit_wash": {"work_status": "work", "mode": "fruit"} } } },