From d9c36920e985c9f1aedb9d2b8a1c686da799e588 Mon Sep 17 00:00:00 2001 From: K <129178072+xiasi0@users.noreply.github.com> Date: Sat, 17 Jan 2026 23:02:15 +0800 Subject: [PATCH] Add Water Model Support for T0xED (#94) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加COLMO A36S 前置过滤器和美的 MRO1012-R 净热一体机及对应实体翻译 --- .../midea_auto_cloud/device_mapping/T0xED.py | 182 +++++++++++++++++- .../midea_auto_cloud/translations/en.json | 54 ++++++ .../translations/zh-Hans.json | 54 ++++++ 3 files changed, 289 insertions(+), 1 deletion(-) diff --git a/custom_components/midea_auto_cloud/device_mapping/T0xED.py b/custom_components/midea_auto_cloud/device_mapping/T0xED.py index 99ff636..35a40a0 100644 --- a/custom_components/midea_auto_cloud/device_mapping/T0xED.py +++ b/custom_components/midea_auto_cloud/device_mapping/T0xED.py @@ -1,4 +1,4 @@ -from homeassistant.const import Platform, UnitOfTemperature, UnitOfTime, UnitOfElectricPotential, \ +from homeassistant.const import Platform, UnitOfTemperature, UnitOfPressure, UnitOfTime, UnitOfElectricPotential, \ UnitOfVolume, UnitOfMass, PERCENTAGE from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass from homeassistant.components.binary_sensor import BinarySensorDeviceClass @@ -238,5 +238,185 @@ DEVICE_MAPPING = { }, } } + }, + "63200854": { + "rationale": ["off", "on"], + "queries": [{}], + "entities": { + Platform.SWITCH: { + "open_close_switch": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "open_close_switch" + }, + "leak_water_protect": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "leak_water_protection" + }, + "start_clean": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "start_clean" + }, + }, + Platform.SELECT: { + "clean_interval": { + "options": { + "off": {"clean_interval": "0"}, + "7天": {"clean_interval": "7"}, + "15天": {"clean_interval": "15"}, + "30天": {"clean_interval": "30"} + }, + "translation_key": "clean_interval" + } + }, + Platform.NUMBER: { + "clean_water_consumption": { + "min": 0, + "max": 60, + "step": 1, + "translation_key": "clean_water_consumption" + }, + }, + Platform.SENSOR: { + "input_temperature_Sensing": { + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": UnitOfTemperature.CELSIUS, + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "input_temperature_sensing" + }, + "input_pressure_Sensing": { + "device_class": SensorDeviceClass.PRESSURE, + "unit_of_measurement": "kPa", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "water_gage" + }, + "all_water_consumption": { + "device_class": SensorDeviceClass.VOLUME, + "unit_of_measurement": "L", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "water_consumption_big" + }, + "water_flow": { + "device_class": SensorDeviceClass.VOLUME_FLOW_RATE, + "unit_of_measurement": "L/min", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "water_flow" + }, + "clean_water_consumption_next_remaining": { + "device_class": SensorDeviceClass.ENUM, + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "clean_water_consumption_next_remaining" + }, + "clean_interval_next_days_remaining": { + "device_class": SensorDeviceClass.DURATION, + "unit_of_measurement": "D", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "clean_interval_next_days_remaining" + }, + }, + } + }, + "632009EN": { + "rationale": ["off", "on"], + "queries": [{}], + "entities": { + Platform.SWITCH: { + "heat": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "Heat_function" + }, + "antifreeze": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "antifreeze" + }, + "wash": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "filter_element_flushing" + }, + "no_obsolete_water": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "no_obsolete_water" + }, + "save_mode": { + "device_class": SwitchDeviceClass.SWITCH, + "translation_key": "save_mode" + } + }, + Platform.NUMBER: { + "quantify_21": { + "min": 300, + "max": 500, + "step": 100, + "translation_key": "quantify_21", + "unit_of_measurement": "mL" + }, + "quantify_22": { + "min": 500, + "max": 1000, + "step": 100, + "translation_key": "quantify_22", + "unit_of_measurement": "mL" + }, + "quantify_23": { + "min": 1000, + "max": 1500, + "step": 100, + "translation_key": "quantify_23", + "unit_of_measurement": "mL" + } + }, + Platform.SENSOR: { + "in_tds": { + "device_class": SensorDeviceClass.WATER, + "unit_of_measurement": "mg/L", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "in_tds" + }, + "out_tds": { + "device_class": SensorDeviceClass.WATER, + "unit_of_measurement": "mg/L", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "out_tds" + }, + "life_1": { + "device_class": SensorDeviceClass.BATTERY, + "unit_of_measurement": "%", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "life_1" + }, + "life_2": { + "device_class": SensorDeviceClass.BATTERY, + "unit_of_measurement": "%", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "life_2_PCB" + }, + "water_consumption": { + "device_class": SensorDeviceClass.VOLUME, + "unit_of_measurement": "mL", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "water_consumption" + }, + "hot_pot_temperature": { + "device_class": SensorDeviceClass.TEMPERATURE, + "unit_of_measurement": "°C", + "state_class": SensorStateClass.MEASUREMENT, + "translation_key": "hot_pot_temperature" + }, + "heat_start": { + "name": "1=加热中/2=保温中", + "device_class": SensorDeviceClass.ENUM + } + }, + Platform.BINARY_SENSOR: { + "out_water": { + "device_class": BinarySensorDeviceClass.RUNNING, + "translation_key": "out_water" + }, + "out_hot_water": { + "device_class": BinarySensorDeviceClass.RUNNING, + "translation_key": "out_hot_water" + } + } + } + } } diff --git a/custom_components/midea_auto_cloud/translations/en.json b/custom_components/midea_auto_cloud/translations/en.json index fec8a4c..b58da72 100644 --- a/custom_components/midea_auto_cloud/translations/en.json +++ b/custom_components/midea_auto_cloud/translations/en.json @@ -325,6 +325,12 @@ }, "standby_status": { "name": "Standby Status" + }, + "out_water": { + "name": "Out Water" + }, + "out_hot_water": { + "name": "Out Hot Water" }, "on_seat": { "name": "On Seat" @@ -1069,6 +1075,15 @@ "4": "Medium High", "5": "High" } + }, + "clean_interval": { + "name": "Clean Interval", + "state": { + "0": "OFF", + "7": "7Day", + "15": "15Day", + "30": "30Day" + } }, "water_pressure_woman": { "name": "Feminine Water Pressure", @@ -1977,6 +1992,9 @@ }, "life_2": { "name": "MPC Filter Cartridge Lifespan" + }, + "life_2_pcb": { + "name": "Life2_PCB" }, "water_consumption": { "name": "Water Consumption" @@ -2115,6 +2133,12 @@ }, "total_elec_value": { "name": "Total Electricity" + }, + "clean_water_consumption_next_remaining": { + "name": "Clean Water Consumption Next Remaining" + }, + "clean_interval_next_days_remaining": { + "name": "Clean Interval Next Days Remaining" }, "filter_use_per": { "name": "Filter Use Percentage" @@ -2233,6 +2257,18 @@ }, "rinse_level": { "name": "Rinse Level" + }, + "clean_water_consumption": { + "name": "Clean Water Consumption" + }, + "quantify_21": { + "name": "Quantify 1" + }, + "quantify_22": { + "name": "Quantify 2" + }, + "quantify_23": { + "name": "Quantify 3" }, "wash_strength": { "name": "Water Strength" @@ -2369,6 +2405,9 @@ }, "hot_power": { "name": "Hot Power" + }, + "heat_function": { + "name": "Heat Function" }, "midea_manager": { "name": "Midea Manager" @@ -3242,6 +3281,21 @@ }, "auto_eco": { "name": "Auto Eco" + }, + "open_close_switch": { + "name": "Open Close Switch" + }, + "start_clean": { + "name": "Start Clean" + }, + "filter_element_flushing": { + "name": "Filter Element Flushing" + }, + "no_obsolete_water": { + "name": "No Obsolete Water" + }, + "save_mode": { + "name": "Save Mode" }, "sedentary_remind": { "name": "Sedentary Remind" diff --git a/custom_components/midea_auto_cloud/translations/zh-Hans.json b/custom_components/midea_auto_cloud/translations/zh-Hans.json index 5368e31..2ca84a3 100644 --- a/custom_components/midea_auto_cloud/translations/zh-Hans.json +++ b/custom_components/midea_auto_cloud/translations/zh-Hans.json @@ -346,6 +346,12 @@ "standby_status": { "name": "待机状态" }, + "out_water": { + "name": "出水状态" + }, + "out_hot_water": { + "name": "出热水状态" + }, "on_seat": { "name": "坐圈状态" } @@ -1306,6 +1312,15 @@ "5": "高档" } }, + "clean_interval": { + "name": "间隔周期设置", + "state": { + "0": "OFF", + "7": "7天", + "15": "15天", + "30": "30天" + } + }, "water_pressure_woman": { "name": "妇洗冲洗强度", "state": { @@ -2272,6 +2287,9 @@ "life_2": { "name": "MPC滤芯寿命" }, + "life_2_PCB": { + "name": "PCB滤芯寿命" + }, "water_consumption": { "name": "用水量" }, @@ -2410,6 +2428,12 @@ "total_elec_value": { "name": "总耗电量" }, + "clean_water_consumption_next_remaining": { + "name": "距离下次冲洗剩余吨数" + }, + "clean_interval_next_days_remaining": { + "name": "距离下次冲洗剩余天数" + }, "filter_use_per": { "name": "滤芯使用百分比" } @@ -2537,6 +2561,18 @@ "rinse_level": { "name": "漂洗水位" }, + "clean_water_consumption": { + "name": "清洗用水量设置" + }, + "quantify_21": { + "name": "定量1" + }, + "quantify_22": { + "name": "定量2" + }, + "quantify_23": { + "name": "定量3" + }, "wash_strength": { "name": "水流强度" } @@ -2685,6 +2721,9 @@ "hot_power": { "name": "加热电源" }, + "Heat_function": { + "name": "加热功能" + }, "midea_manager": { "name": "美的管理" }, @@ -3558,6 +3597,21 @@ "auto_eco": { "name": "自动节能" }, + "open_close_switch": { + "name": "全屋水开关" + }, + "start_clean": { + "name": "立即冲洗" + }, + "filter_element_flushing": { + "name": "滤芯冲洗" + }, + "no_obsolete_water": { + "name": "零陈水_水质优先(推荐)" + }, + "save_mode": { + "name": "零陈水_省水优先" + }, "sedentary_remind": { "name": "久坐提醒" }