From 1ddfa9f02000798d56484bf48e8ba72588cfa8b7 Mon Sep 17 00:00:00 2001 From: sususweet Date: Sat, 11 Oct 2025 20:44:33 +0800 Subject: [PATCH] feat: update device mapping for T0xB6. Fix #26. --- .../midea_auto_cloud/device_mapping/T0xB6.py | 34 +++++++++++++++++++ .../midea_auto_cloud/translations/en.json | 3 ++ .../translations/zh-Hans.json | 3 ++ 3 files changed, 40 insertions(+) create mode 100644 custom_components/midea_auto_cloud/device_mapping/T0xB6.py diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xB6.py b/custom_components/midea_auto_cloud/device_mapping/T0xB6.py new file mode 100644 index 0000000..92c4752 --- /dev/null +++ b/custom_components/midea_auto_cloud/device_mapping/T0xB6.py @@ -0,0 +1,34 @@ +from homeassistant.const import Platform +from homeassistant.components.switch import SwitchDeviceClass + +DEVICE_MAPPING = { + "default": { + "rationale": ["off", "on"], + "queries": [{}], + "centralized": [], + "entities": { + Platform.SWITCH: { + "power": { + "device_class": SwitchDeviceClass.SWITCH, + }, + "light": { + "device_class": SwitchDeviceClass.SWITCH, + }, + "wisdom_wind": { + "device_class": SwitchDeviceClass.SWITCH, + } + }, + Platform.SELECT: { + "wind_pressure": { + "options": { + "off": {"wind_pressure": "0"}, + "low": {"wind_pressure": "1"}, + "medium": {"wind_pressure": "2"}, + "high": {"wind_pressure": "3"}, + "extreme": {"wind_pressure": "4"}, + } + }, + }, + } + } +} diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index b7a9e50..b8500e6 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -620,6 +620,9 @@ }, "power_off_time": { "name": "Power Off Time" + }, + "wind_pressure": { + "name": "Wind Pressure" } }, "sensor": { diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index 2ac9ddb..43f0344 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -620,6 +620,9 @@ }, "power_off_time": { "name": "关机时间" + }, + "wind_pressure": { + "name": "风压" } }, "sensor": {