From e4334cd936807f35104552dd2fae193ee1f491f5 Mon Sep 17 00:00:00 2001 From: sususweet Date: Tue, 30 Sep 2025 15:15:29 +0800 Subject: [PATCH] fix: device control of T0xE2 --- .../midea_auto_cloud/device_mapping/T0xE2.py | 73 +------------------ 1 file changed, 4 insertions(+), 69 deletions(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xE2.py b/custom_components/midea_auto_cloud/device_mapping/T0xE2.py index 36c5854..69e8d32 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xE2.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xE2.py @@ -8,38 +8,14 @@ DEVICE_MAPPING = { "manufacturer": "美的", "rationale": ["off", "on"], "queries": [{}], - "centralized": [ - "power", "temperature", "mode", "heat", "music", "ti_protect", "fast_wash", - "ali_manager", "water_quality", "rate", "ele_exception", "communication_error", - "cur_rate", "sterilize_left_days", "uv_sterilize_minute", "uv_sterilize_second", - "eplus", "summer", "winter", "efficient", "night", "bath_person", "cloud", - "bath", "half_heat", "whole_heat", "sterilization", "frequency_hot", "scene", - "big_water", "wash", "negative_ions", "screen_off", "t_hot", "baby_wash", - "dad_wash", "mom_wash", "wash_with_temp", "single_wash", "people_wash", - "wash_temperature", "one_egg", "two_egg", "always_fell", "smart_sterilize", - "sterilize_cycle_index", "sound_dad", "screen_light", "morning_night_bash", - "version", "tds_value", "door_status", "limit_error", "sensor_error", - "scene_id", "auto_off", "clean", "volume", "passwater_lowbyte", "cloud_appoint", - "protect", "midea_manager", "sleep", "memory", "shower", "scroll_hot", - "fast_hot_power", "hot_power", "safe", "water_flow", "heat_water_level", - "flow", "appoint_wash", "now_wash", "end_time_hour", "end_time_minute", - "get_time", "get_temp", "func_select", "warm_power", "type_select", - "cur_temperature", "sterilize_high_temp", "discharge_status", "top_temp", - "bottom_heat", "top_heat", "show_h", "uv_sterilize", "machine", "error_code", - "need_discharge", "elec_warning", "bottom_temp", "water_cyclic", "water_system", - "discharge_left_time", "in_temperature", "mg_remain", "waterday_lowbyte", - "waterday_highbyte", "tech_water", "protect_show", "appoint_power" - ], + "centralized": [], "entities": { Platform.WATER_HEATER: { "water_heater": { "power": "power", "operation_list": { "off": {"power": "off"}, - "heat": {"power": "on", "mode": "heat"}, - "auto": {"power": "on", "mode": "auto"}, - "eco": {"power": "on", "mode": "eco"}, - "fast": {"power": "on", "mode": "fast"} + "on": {"power": "on"}, }, "target_temperature": "temperature", "current_temperature": "cur_temperature", @@ -53,21 +29,6 @@ DEVICE_MAPPING = { "ti_protect": { "device_class": SwitchDeviceClass.SWITCH, }, - "heat": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "efficient": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "bath": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "half_heat": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "whole_heat": { - "device_class": SwitchDeviceClass.SWITCH, - }, "auto_off": { "device_class": SwitchDeviceClass.SWITCH, }, @@ -80,38 +41,14 @@ DEVICE_MAPPING = { "memory": { "device_class": SwitchDeviceClass.SWITCH, }, - "shower": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "fast_hot_power": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "hot_power": { - "device_class": SwitchDeviceClass.SWITCH, - }, "safe": { "device_class": SwitchDeviceClass.SWITCH, }, "water_flow": { "device_class": SwitchDeviceClass.SWITCH, }, - "bottom_heat": { - "device_class": SwitchDeviceClass.SWITCH, - }, - "top_heat": { - "device_class": SwitchDeviceClass.SWITCH, - }, }, Platform.SELECT: { - "mode": { - "options": { - "none": {"mode": "none"}, - "heat": {"mode": "heat"}, - "auto": {"mode": "auto"}, - "eco": {"mode": "eco"}, - "fast": {"mode": "fast"} - } - }, "water_quality": { "options": { "0": {"water_quality": 0}, @@ -123,15 +60,13 @@ DEVICE_MAPPING = { "func_select": { "options": { "low": {"func_select": "low"}, - "medium": {"func_select": "medium"}, - "high": {"func_select": "high"} + "medium": {"func_select": "medium"} } }, "type_select": { "options": { "normal": {"type_select": "normal"}, - "eco": {"type_select": "eco"}, - "fast": {"type_select": "fast"} + "valve": {"type_select": "valve"}, } }, "machine": {