From 883369184bfd95537e555a4929d6e11f1d03f050 Mon Sep 17 00:00:00 2001 From: sususweet Date: Thu, 6 Nov 2025 22:31:08 +0800 Subject: [PATCH] feat: fix support for T0xE2 --- .../midea_auto_cloud/device_mapping/T0xE2.py | 21 +++++++++++-------- .../midea_auto_cloud/translations/en.json | 6 +++--- .../translations/zh-Hans.json | 6 +++--- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xE2.py b/custom_components/midea_auto_cloud/device_mapping/T0xE2.py index 2f430af..a40f0e7 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xE2.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xE2.py @@ -10,12 +10,23 @@ DEVICE_MAPPING = { "queries": [{}], "centralized": [], "entities": { + Platform.NUMBER: { + "water_quality": { + "min": 0, + "max": 3, + "step": 1 + }, + "cur_temperature": { + "device_class": SensorDeviceClass.TEMPERATURE, + "state_class": SensorStateClass.MEASUREMENT, + } + }, Platform.CLIMATE: { "water_heater": { "power": "power", "hvac_modes": { "off": {"power": "off"}, - "on": {"power": "on"}, + "heat": {"power": "on"}, }, "target_temperature": "temperature", "current_temperature": "cur_temperature", @@ -52,14 +63,6 @@ DEVICE_MAPPING = { }, }, Platform.SELECT: { - "water_quality": { - "options": { - "0": {"water_quality": 0}, - "1": {"water_quality": 1}, - "2": {"water_quality": 2}, - "3": {"water_quality": 3} - } - }, "func_select": { "options": { "low": {"func_select": "low"}, diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index acec49d..1c86c29 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -553,9 +553,6 @@ "type_select": { "name": "Type Select" }, - "water_quality": { - "name": "Water Quality" - }, "work_status": { "name": "Work Status" }, @@ -1510,6 +1507,9 @@ } }, "number": { + "water_quality": { + "name": "Water Quality" + }, "b6_lightness": { "name": "Smoke Machine Lightness" }, diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index 7205fe9..7222b09 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -560,9 +560,6 @@ "type_select": { "name": "类型选择" }, - "water_quality": { - "name": "水质" - }, "work_status": { "name": "工作状态" }, @@ -1514,6 +1511,9 @@ } }, "number": { + "water_quality": { + "name": "水质" + }, "b6_lightness": { "name": "烟机照明" },