From a0c1423933a2a8b600d851bec02f83fd1c195445 Mon Sep 17 00:00:00 2001 From: sususweet Date: Thu, 27 Nov 2025 16:05:44 +0800 Subject: [PATCH] feat: add support for Integrated Oven. Fixed #55. --- .../midea_auto_cloud/device_mapping/T0x9C.py | 32 ++++++++++++++++++- .../midea_auto_cloud/translations/en.json | 18 +++++++++++ .../translations/zh-Hans.json | 18 +++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0x9C.py b/custom_components/midea_auto_cloud/device_mapping/T0x9C.py index 76a0985..f06ac88 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0x9C.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0x9C.py @@ -8,7 +8,7 @@ DEVICE_MAPPING = { "default": { "rationale": ["off", "on"], "queries": [{}], - "centralized": ["b6_light"], + "centralized": [], "entities": { Platform.NUMBER: { "b6_lightness": { @@ -18,11 +18,26 @@ DEVICE_MAPPING = { } }, Platform.SWITCH: { + "total_power": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "power" + }, + "total_lock": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "lock" + }, "b6_light": { "device_class": SwitchDeviceClass.SWITCH, }, }, Platform.SELECT: { + "b3_function_control":{ + "options": { + "关闭": {"b3_work_cabinet_control": 1, "b3_function_control": 1}, + "消毒": {"b3_work_cabinet_control": 1, "b3_function_control": 2, "b3_work_destination_time": 60}, + "烘干": {"b3_work_cabinet_control": 1, "b3_function_control": 4, "b3_work_destination_time": 120}, + } + }, "b6_gear": { "options": { "关": {"b6_gear": "0"}, @@ -75,10 +90,25 @@ DEVICE_MAPPING = { } }, Platform.SENSOR: { + "b3_upstair_status": { + "device_class": SensorDeviceClass.ENUM, + }, "b6_wind_pressure": { "device_class": SensorDeviceClass.PRESSURE, "unit_of_measurement": UnitOfPressure.PA, "state_class": SensorStateClass.MEASUREMENT + }, + "b7_left_status": { + "device_class": SensorDeviceClass.ENUM, + }, + "b7_left_gear": { + "device_class": SensorDeviceClass.ENUM, + }, + "b7_right_status": { + "device_class": SensorDeviceClass.ENUM, + }, + "b7_right_gear": { + "device_class": SensorDeviceClass.ENUM, } } } diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index 264c0c9..32a1bc7 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -371,6 +371,9 @@ "humidity": { "name": "Humidity" }, + "b3_function_control": { + "name": "Disinfection Cabinet Control" + }, "b6_power": { "name": "Smoke Machine Power" }, @@ -694,6 +697,21 @@ "auto_min_set_temp": { "name": "Auto Min Set Temp" }, + "b3_upstair_status": { + "name": "Disinfection Cabinet Status" + }, + "b7_left_status": { + "name": "Left Stove Status" + }, + "b7_left_gear": { + "name": "Left Stove Gear" + }, + "b7_right_status": { + "name": "Right Stove Status" + }, + "b7_right_gear": { + "name": "Left Stove Gear" + }, "bath_out_volume": { "name": "Bath Out Volume" }, diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index fbe19a1..8136cf5 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -375,6 +375,9 @@ "humidity": { "name": "设定湿度" }, + "b3_function_control": { + "name": "消毒柜控制" + }, "b6_power": { "name": "烟机开关" }, @@ -698,6 +701,21 @@ "auto_min_set_temp": { "name": "自动最小设定温度" }, + "b3_upstair_status": { + "name": "消毒柜状态" + }, + "b7_left_status": { + "name": "左灶状态" + }, + "b7_left_gear": { + "name": "左灶档位" + }, + "b7_right_status": { + "name": "右灶状态" + }, + "b7_right_gear": { + "name": "右灶档位" + }, "bath_out_volume": { "name": "浴缸出水量" },