From 84f8b4b09043c82a011d73a6e584905d8eede30a Mon Sep 17 00:00:00 2001 From: Yingqi Tang Date: Fri, 12 Dec 2025 15:45:41 +0800 Subject: [PATCH] Add device mapping for 171H120F with climate and sensor entities. Fix #70. --- .../midea_auto_cloud/device_mapping/T0xC3.py | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xC3.py b/custom_components/midea_auto_cloud/device_mapping/T0xC3.py index a0beb2e..98fda18 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xC3.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xC3.py @@ -73,5 +73,69 @@ DEVICE_MAPPING = { } } } + }, + "171H120F": { + "rationale": ["off", "on"], + "queries": [{}, {""}], + "centralized": [], + "entities": { + Platform.CLIMATE: { + "Zone1": { + "translation_key": "zone1", + "power": "zone1_power_state", + "hvac_modes": { + "off": {"zone1_power_state": "off"}, + "heat": {"zone1_power_state": "on"}, + }, + "target_temperature": "zone1_temp_set", + "min_temp": "zone1_heat_min_set_temp", + "max_temp": "zone1_heat_max_set_temp", + "temperature_unit": UnitOfTemperature.CELSIUS, + "precision": PRECISION_HALVES, + }, + "DHW": { + "translation_key": "dhw", + "power": "dhw_power_state", + "hvac_modes": { + "off": {"dhw_power_state": "off"}, + "heat": {"dhw_power_state": "on"}, + }, + "target_temperature": "dhw_temp_set", + "current_temperature": "tank_actual_temp", + "min_temp": "dhw_min_set_temp", + "max_temp": "dhw_max_set_temp", + "temperature_unit": UnitOfTemperature.CELSIUS, + "precision": PRECISION_HALVES, + } + }, + Platform.SWITCH: { + "fastdhw_state": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "fastdhw_state", + }, + "forcetbh_state": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "forcetbh_state", + }, + }, + Platform.SENSOR: { + "run_mode_set": { + "device_class": SensorDeviceClass.ENUM, + "translation_key": "mode", + }, + "room_temp_set": { + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": UnitOfTemperature.CELSIUS, + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "room_temperature", + }, + "tank_actual_temp":{ + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": UnitOfTemperature.CELSIUS, + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "cur_temperature", + } + } + } } }