fix: device control of T0xE2

This commit is contained in:
sususweet
2025-09-30 15:15:29 +08:00
parent 8b93c58654
commit e4334cd936

View File

@@ -8,38 +8,14 @@ DEVICE_MAPPING = {
"manufacturer": "美的", "manufacturer": "美的",
"rationale": ["off", "on"], "rationale": ["off", "on"],
"queries": [{}], "queries": [{}],
"centralized": [ "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"
],
"entities": { "entities": {
Platform.WATER_HEATER: { Platform.WATER_HEATER: {
"water_heater": { "water_heater": {
"power": "power", "power": "power",
"operation_list": { "operation_list": {
"off": {"power": "off"}, "off": {"power": "off"},
"heat": {"power": "on", "mode": "heat"}, "on": {"power": "on"},
"auto": {"power": "on", "mode": "auto"},
"eco": {"power": "on", "mode": "eco"},
"fast": {"power": "on", "mode": "fast"}
}, },
"target_temperature": "temperature", "target_temperature": "temperature",
"current_temperature": "cur_temperature", "current_temperature": "cur_temperature",
@@ -53,21 +29,6 @@ DEVICE_MAPPING = {
"ti_protect": { "ti_protect": {
"device_class": SwitchDeviceClass.SWITCH, "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": { "auto_off": {
"device_class": SwitchDeviceClass.SWITCH, "device_class": SwitchDeviceClass.SWITCH,
}, },
@@ -80,38 +41,14 @@ DEVICE_MAPPING = {
"memory": { "memory": {
"device_class": SwitchDeviceClass.SWITCH, "device_class": SwitchDeviceClass.SWITCH,
}, },
"shower": {
"device_class": SwitchDeviceClass.SWITCH,
},
"fast_hot_power": {
"device_class": SwitchDeviceClass.SWITCH,
},
"hot_power": {
"device_class": SwitchDeviceClass.SWITCH,
},
"safe": { "safe": {
"device_class": SwitchDeviceClass.SWITCH, "device_class": SwitchDeviceClass.SWITCH,
}, },
"water_flow": { "water_flow": {
"device_class": SwitchDeviceClass.SWITCH, "device_class": SwitchDeviceClass.SWITCH,
}, },
"bottom_heat": {
"device_class": SwitchDeviceClass.SWITCH,
},
"top_heat": {
"device_class": SwitchDeviceClass.SWITCH,
},
}, },
Platform.SELECT: { Platform.SELECT: {
"mode": {
"options": {
"none": {"mode": "none"},
"heat": {"mode": "heat"},
"auto": {"mode": "auto"},
"eco": {"mode": "eco"},
"fast": {"mode": "fast"}
}
},
"water_quality": { "water_quality": {
"options": { "options": {
"0": {"water_quality": 0}, "0": {"water_quality": 0},
@@ -123,15 +60,13 @@ DEVICE_MAPPING = {
"func_select": { "func_select": {
"options": { "options": {
"low": {"func_select": "low"}, "low": {"func_select": "low"},
"medium": {"func_select": "medium"}, "medium": {"func_select": "medium"}
"high": {"func_select": "high"}
} }
}, },
"type_select": { "type_select": {
"options": { "options": {
"normal": {"type_select": "normal"}, "normal": {"type_select": "normal"},
"eco": {"type_select": "eco"}, "valve": {"type_select": "valve"},
"fast": {"type_select": "fast"}
} }
}, },
"machine": { "machine": {