From b30f508e9696a38ceb2eb5c871288e10419091d8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Sep 2023 12:24:15 +0800 Subject: [PATCH] added config for 22012227 --- .../midea_meiju_codec/device_mapping/T0xAC.py | 94 ++++++++++++++++++- 1 file changed, 92 insertions(+), 2 deletions(-) diff --git a/custom_components/midea_meiju_codec/device_mapping/T0xAC.py b/custom_components/midea_meiju_codec/device_mapping/T0xAC.py index 7320a44..0a77492 100644 --- a/custom_components/midea_meiju_codec/device_mapping/T0xAC.py +++ b/custom_components/midea_meiju_codec/device_mapping/T0xAC.py @@ -60,13 +60,103 @@ DEVICE_MAPPING = { }, Platform.SWITCH: { "dry": { - "name": "Dry", + "name": "干燥", "device_class": SwitchDeviceClass.SWITCH, }, "prevent_straight_wind": { "name": "防直吹", "device_class": SwitchDeviceClass.SWITCH, "rationale": [1, 2] + }, + "aux_heat": { + "name": "电辅热", + "device_class": SwitchDeviceClass.SWITCH, + } + }, + Platform.SENSOR: { + "indoor_temperature": { + "name": "室内温度", + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": TEMP_CELSIUS, + "state_class": SensorStateClass.MEASUREMENT + }, + "outdoor_temperature": { + "name": "室外机温度", + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": TEMP_CELSIUS, + "state_class": SensorStateClass.MEASUREMENT + }, + } + } + }, + "22012227": { + "manufacturer": "美的", + "rationale": ["off", "on"], + "queries": [{}, {"query_type": "prevent_straight_wind"}], + "centralized": ["power", "temperature", "small_temperature", "mode", "eco", "comfort_power_save", + "comfort_sleep", "strong_wind", "wind_swing_lr", "wind_swing_lr", "wind_speed", + "ptc", "dry"], + "entities": { + Platform.CLIMATE: { + "thermostat": { + "name": "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", + "comfort_power_save": "off", + "comfort_sleep": "off", + "strong_wind": "off" + }, + "eco": {"eco": "on"}, + "comfort": {"comfort_power_save": "on"}, + "sleep": {"comfort_sleep": "on"}, + "boost": {"strong_wind": "on"} + }, + "swing_modes": { + "off": {"wind_swing_lr": "off", "wind_swing_ud": "off"}, + "both": {"wind_swing_lr": "on", "wind_swing_ud": "on"}, + "horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"}, + "vertical": {"wind_swing_lr": "off", "wind_swing_ud": "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", + "aux_heat": "ptc", + "min_temp": 17, + "max_temp": 30, + "temperature_unit": TEMP_CELSIUS, + "precision": PRECISION_HALVES, + } + }, + Platform.SWITCH: { + "dry": { + "name": "干燥", + "device_class": SwitchDeviceClass.SWITCH, + }, + "prevent_straight_wind": { + "name": "防直吹", + "device_class": SwitchDeviceClass.SWITCH, + "rationale": [1, 2] + }, + "aux_heat": { + "name": "电辅热", + "device_class": SwitchDeviceClass.SWITCH, } }, Platform.SENSOR: { @@ -149,4 +239,4 @@ DEVICE_MAPPING = { } } } -} \ No newline at end of file +}