From 40df4d1a83d49bcc99df1912cf24423763e1916f Mon Sep 17 00:00:00 2001 From: Cyborg2017 Date: Fri, 26 Dec 2025 21:12:26 +0800 Subject: [PATCH] feat: add device mapping for T0xFD(202Z310H) * Device type: T0xFD, Sn8: 202Z310H, model: SZK-1Y80. --- .../midea_auto_cloud/device_mapping/T0xFD.py | 82 +++++++++++++++++++ .../midea_auto_cloud/translations/en.json | 8 ++ .../translations/zh-Hans.json | 10 ++- 3 files changed, 99 insertions(+), 1 deletion(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xFD.py b/custom_components/midea_auto_cloud/device_mapping/T0xFD.py index 143a7e0..cc67e47 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xFD.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xFD.py @@ -156,5 +156,87 @@ DEVICE_MAPPING = { } } } + }, + "202Z310H": { + "rationale": ["off", "on"], + "queries": [{}], + "centralized": [], + "entities": { + Platform.SWITCH: { + "buzzer": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "voice", + }, + "airDry_on_off": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "airdry_on_off", + }, + "power": { + "device_class": SwitchDeviceClass.SWITCH, + }, + "power_on_timer": { + "device_class": SwitchDeviceClass.SWITCH, + }, + "power_off_timer": { + "device_class": SwitchDeviceClass.SWITCH, + } + }, + Platform.BINARY_SENSOR: { + "add_water_flag": { + "device_class": BinarySensorDeviceClass.PROBLEM, + } + }, + Platform.SELECT: { + "humidity_mode": { + "options": { + "manual": {"humidity_mode": "manual"}, + "auto": {"humidity_mode": "auto"}, + "sleep": {"humidity_mode": "sleep"} + } + }, + "wind_speed": { + "options": { + "low": {"wind_speed": "low"}, + "middle": {"wind_speed": "middle"}, + "high": {"wind_speed": "high"} + } + } + }, + Platform.SENSOR: { + "running_percent": { + "device_class": SensorDeviceClass.POWER_FACTOR, + "unit_of_measurement": PERCENTAGE, + "state_class": SensorStateClass.MEASUREMENT + }, + "error_code": { + "device_class": SensorDeviceClass.ENUM + }, + "cur_temperature": { + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": UnitOfTemperature.CELSIUS, + "state_class": SensorStateClass.MEASUREMENT + }, + "air_dry_left_time": { + "device_class": SensorDeviceClass.DURATION, + "unit_of_measurement": UnitOfTime.MINUTES, + "state_class": SensorStateClass.MEASUREMENT + }, + "time_on": { + "device_class": SensorDeviceClass.DURATION, + "unit_of_measurement": UnitOfTime.MINUTES, + "state_class": SensorStateClass.MEASUREMENT + }, + "time_off": { + "device_class": SensorDeviceClass.DURATION, + "unit_of_measurement": UnitOfTime.MINUTES, + "state_class": SensorStateClass.MEASUREMENT + }, + "tank_status": { + "device_class": SensorDeviceClass.BATTERY, + "unit_of_measurement": PERCENTAGE, + "state_class": SensorStateClass.MEASUREMENT + } + } + } } } \ No newline at end of file diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index e529227..93a4cb7 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -544,6 +544,7 @@ "humidity_mode": { "name": "Humidity Mode", "state": { + "auto": "auto", "manual": "manual", "moist_skin": "moist skin", "sleep": "sleep" @@ -752,6 +753,7 @@ "state": { "low": "low", "medium": "medium", + "middle": "middle", "high": "high", "auto": "auto", "invalid": "invalid" @@ -2014,6 +2016,12 @@ "auto_power_off": { "name": "Auto Power Off" }, + "power_on_timer": { + "name": "Power On Timer" + }, + "power_off_timer": { + "name": "Power Off Timer" + }, "voice": { "name": "Sound" }, diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index c80a335..5d69e2c 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -644,6 +644,7 @@ "humidity_mode": { "name": "湿度模式", "state": { + "auto": "AI湿随温变", "manual": "手动", "moist_skin": "润肤", "sleep": "睡眠" @@ -852,6 +853,7 @@ "state": { "low": "低速", "medium": "中速", + "middle": "中速", "high": "高速", "auto": "自动", "invalid": "无效" @@ -2114,6 +2116,12 @@ "auto_power_off": { "name": "待机超时自动关机" }, + "power_on_timer": { + "name": "定时开机" + }, + "power_off_timer": { + "name": "定时关机" + }, "voice": { "name": "声音" }, @@ -2340,7 +2348,7 @@ "name": "启停" }, "airdry_on_off": { - "name": "风干开关" + "name": "湿帘风干" }, "airswitch": { "name": "烘干存储开关"