From 02ae8bc33f8fd941112695cd58f4cd46ffaa4024 Mon Sep 17 00:00:00 2001 From: yang605256182 <605256182@qq.com> Date: Wed, 10 Dec 2025 21:46:36 +0800 Subject: [PATCH] add humidification, sterilization, dust removal, and odor elimination --- .../midea_auto_cloud/device_mapping/T0xAC.py | 95 ++++++++++++++++++- .../midea_auto_cloud/translations/en.json | 33 +++++++ .../translations/zh-Hans.json | 33 +++++++ 3 files changed, 160 insertions(+), 1 deletion(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xAC.py b/custom_components/midea_auto_cloud/device_mapping/T0xAC.py index 42d2754..ae10e76 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xAC.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xAC.py @@ -219,17 +219,110 @@ DEVICE_MAPPING = { "aux_heat": { "device_class": SwitchDeviceClass.SWITCH, }, - "manul_fresh_air": { + "elec_dust_remove": { "device_class": SwitchDeviceClass.SWITCH, }, "auto_comfort_fresh_air": { "device_class": SwitchDeviceClass.SWITCH, + "rationale": [0, 1] }, "auto_fresh_off_co2": { "device_class": SwitchDeviceClass.SWITCH, + "rationale": [0, 1] }, "comfort_fresh_air": { "device_class": SwitchDeviceClass.SWITCH, + "rationale": [0, 1] + }, + "manul_humi":{ + "device_class": SwitchDeviceClass.SWITCH, + }, + "remove_arofene":{ + "device_class": SwitchDeviceClass.SWITCH, + "rationale": [0, 1] + }, + "disinfect":{ + "device_class": SwitchDeviceClass.SWITCH, + }, + "remove_peculiar_smell":{ + "device_class": SwitchDeviceClass.SWITCH, + "rationale": [0, 1], + "condition": { + "not": ["remove_peculiar_smell", "air_exhaust"] + } + }, + "air_exhaust": { + "device_class": SwitchDeviceClass.SWITCH, + "rationale": [0, 1], + "condition": { + "not": ["remove_peculiar_smell", "air_exhaust"] + } + }, + "down_wind_left_switch": { + "device_class": SwitchDeviceClass.SWITCH, + "rationale": [1, 0], + "condition": { + "not": ["down_wind_left_switch", "down_wind_right_switch"] + } + }, + "down_wind_right_switch": { + "device_class": SwitchDeviceClass.SWITCH, + "rationale": [1, 0], + "condition": { + "not": ["down_wind_left_switch", "down_wind_right_switch"] + } + } + }, + Platform.NUMBER: { + "manul_humi_value": { + "device_class": NumberDeviceClass.HUMIDITY, + "min": 40, + "max": 70, + "step": 1, + "unit_of_measurement": "%", + "mode": "slider" + }, + "auto_purifier_on_pm": { + "device_class": NumberDeviceClass.PM25, + "min": 75, + "max": 180, + "step": 1, + "unit_of_measurement": "µg/m³", + "mode": "slider", + "icon": "mdi:air-filter" + } + }, + Platform.SELECT: { + "fresh_air_fan_speed": { + "device_class": "enum", + "query": "fresh_air_fan_speed", + "value_mapping": { + 40: "低速", + 60: "中速", + 80: "高速", + 100: "全速" + }, + "options": { + "低速": {"fresh_air_fan_speed": 40}, + "中速": {"fresh_air_fan_speed": 60}, + "高速": {"fresh_air_fan_speed": 80}, + "全速": {"fresh_air_fan_speed": 100} + } + }, + "fresh_air_setting_mode": { + "device_class": "enum", + "query": "fresh_air_setting_mode", + "value_mapping": { + 0: "内外循环", + 1: "外循环" + }, + "options": { + "内外循环": {"fresh_air_setting_mode": 0}, + "外循环": {"fresh_air_setting_mode": 1} + }, + "condition": { + "eq": ["comfort_fresh_air", 1] + } } }, Platform.SENSOR: { diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index 9dffb1f..f236431 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -2768,6 +2768,39 @@ }, "forcetbh_state": { "name": "Force Standby" + }, + "manul_humi": { + "name": "humidification" + }, + "manul_humi_value": { + "name": "Set humidity" + }, + "down_wind_left_switch": { + "name": "Down Wind Left Switch" + }, + "down_wind_right_switch": { + "name": "Down Wind Right Switch" + }, + "disinfect": { + "name": "Disinfect" + }, + "remove_arofene": { + "name": "Remove Arofene" + }, + "remove_peculiar_smell": { + "name": "Remove Peculiar Smell" + }, + "auto_fresh_off_co2": { + "name": "Auto Fresh Off Co2" + }, + "comfort_fresh_air": { + "name": "Comfort Fresh Air" + }, + "elec_dust_remove": { + "name": "Elec Dust Remove" + }, + "air_exhaust": { + "name": "Air Exhaust" } } } diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index fd747bd..8c323f3 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -2863,6 +2863,39 @@ }, "forcetbh_state": { "name": "强制待机" + }, + "manul_humi": { + "name": "加湿" + }, + "manul_humi_value": { + "name": "设置湿度" + }, + "down_wind_left_switch": { + "name": "左出风" + }, + "down_wind_right_switch": { + "name": "右出风" + }, + "disinfect": { + "name": "除菌" + }, + "remove_arofene": { + "name": "除甲醛" + }, + "remove_peculiar_smell": { + "name": "长效除味" + }, + "auto_fresh_off_co2": { + "name": "自动新风" + }, + "comfort_fresh_air": { + "name": "舒适新风" + }, + "elec_dust_remove": { + "name": "除尘" + }, + "air_exhaust": { + "name": "快速除味" } } }