From e3a6ad1681fc3c4e18a679e9ae225d1297f01785 Mon Sep 17 00:00:00 2001 From: Cyborg2017 Date: Sat, 3 Jan 2026 16:12:22 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20device=20mapping=20for=20T0xAC(23?= =?UTF-8?q?096633)=20*=20Device=20type:=20T0xAC,=20Sn8:=2023096633,=20mode?= =?UTF-8?q?l:=20KFR-75T2/B3N8-XF(1)=E2=85=A2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Remove non-existent swing function - Add standalone power switch - Correct aux heat key (ptc) - Add energy sensor with kWh conversion - Add support for intake_wind / exhaust_wind Co-authored-by: Dali Yang --- .../midea_auto_cloud/device_mapping/T0xAC.py | 107 ++++++++++++++++++ .../midea_auto_cloud/translations/en.json | 19 ++++ .../translations/zh-Hans.json | 19 ++++ 3 files changed, 145 insertions(+) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xAC.py b/custom_components/midea_auto_cloud/device_mapping/T0xAC.py index 0cf3868..9f79efb 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xAC.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xAC.py @@ -844,5 +844,112 @@ DEVICE_MAPPING = { } } } + }, + "23096633": { + "rationale": ["off", "on"], + "queries": [{}, {"query_type":"run_status"}, {"query_type":"indoor_humidity"}, {"query_type":"indoor_temperature"}], + "calculate": { + "get": [ + { + "lvalue": "[total_elec_value]", + "rvalue": "float([total_elec]) / 1000" + }, + ], + }, + "centralized": [], + "entities": { + Platform.CLIMATE: { + "thermostat": { + "power": "power", + "hvac_modes": { + "off": {"power": "off"}, + "heat": {"power": "on", "mode": "heat"}, + "cool": {"power": "on", "mode": "cool"}, + "auto": {"power": "on", "mode": "auto"}, + "dry": {"power": "on", "mode": "dry"}, + "fan_only": {"power": "on", "mode": "fan"} + }, + "preset_modes": { + "none": { + "eco": "off", + "cool_power_saving": 0, + "strong_wind": "off" + }, + "eco": {"eco": "on", "cool_power_saving": 1}, + "boost": {"strong_wind": "on"} + }, + "fan_modes": { + "silent": {"wind_speed": 20}, + "low": {"wind_speed": 40}, + "medium": {"wind_speed": 60}, + "high": {"wind_speed": 80}, + "full": {"wind_speed": 100}, + "auto": {"wind_speed": 102} + }, + "target_temperature": ["temperature", "small_temperature"], + "current_temperature": "indoor_temperature", + "pre_mode": "mode", + "aux_heat": "ptc", + "min_temp": 17, + "max_temp": 30, + "temperature_unit": UnitOfTemperature.CELSIUS, + "precision": PRECISION_HALVES, + } + }, + Platform.SWITCH: { + "power": { + "device_class": SwitchDeviceClass.SWITCH, + }, + "ptc": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "aux_heat", + } + }, + Platform.SELECT: { + "new_wind_model_intake_enable": { + "options": { + "off": {"new_wind_model_intake_switch": "off"}, + "low": {"new_wind_model_intake_switch": "on", "new_wind_model_intake_wind": "40"}, + "medium": {"new_wind_model_intake_switch": "on", "new_wind_model_intake_wind": "60"}, + "high": {"new_wind_model_intake_switch": "on", "new_wind_model_intake_wind": "80"}, + "full": {"new_wind_model_intake_switch": "on", "new_wind_model_intake_wind": "100"} + } + }, + "new_wind_model_exhaust_enable": { + "options": { + "off": {"new_wind_model_exhaust_switch": "off"}, + "silent": {"new_wind_model_exhaust_switch": "on", "new_wind_model_exhaust_wind": "20"}, + "high": {"new_wind_model_exhaust_switch": "on", "new_wind_model_exhaust_wind": "80"}, + "full": {"new_wind_model_exhaust_switch": "on", "new_wind_model_exhaust_wind": "100"} + } + }, + "follow_body_sense": { + "options": { + "on": {"follow_body_sense": "on", "follow_body_sense_enable": 1}, + "off": {"follow_body_sense": "off", "follow_body_sense_enable": 1}, + } + } + }, + Platform.SENSOR: { + "mode": { + "device_class": SensorDeviceClass.ENUM, + }, + "indoor_temperature": { + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": UnitOfTemperature.CELSIUS, + "state_class": SensorStateClass.MEASUREMENT + }, + "indoor_humidity": { + "device_class": SensorDeviceClass.HUMIDITY, + "unit_of_measurement": "%", + "state_class": SensorStateClass.MEASUREMENT + }, + "total_elec_value": { + "device_class": SensorDeviceClass.ENERGY, + "unit_of_measurement": "kWh", + "state_class": SensorStateClass.TOTAL_INCREASING + } + } + } } } diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index 35dc546..3ee8c0f 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -408,6 +408,25 @@ } }, "select": { + "new_wind_model_intake_enable": { + "name": "Intake Wind", + "state": { + "off": "Off", + "low": "Low Speed", + "medium": "Medium Speed", + "high": "High Speed", + "full": "Turbo" + } + }, + "new_wind_model_exhaust_enable": { + "name": "Exhaust Wind", + "state": { + "off": "Off", + "silent": "Silent", + "high": "High Speed", + "full": "Turbo" + } + }, "updown": { "name": "Running Status" }, diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index f7b0411..c5ad9e9 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -408,6 +408,25 @@ } }, "select": { + "new_wind_model_intake_enable": { + "name": "新风", + "state": { + "off": "关闭", + "low": "低速", + "medium": "中速", + "high": "高速", + "full": "强劲" + } + }, + "new_wind_model_exhaust_enable": { + "name": "排风", + "state": { + "off": "关闭", + "silent": "静音", + "high": "高速", + "full": "强劲" + } + }, "updown": { "name": "运行状态", "state": {