mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-12-17 09:55:51 +00:00
feat: add support for T0xE6 and T0xED.
This commit is contained in:
70
custom_components/midea_auto_cloud/device_mapping/T0xE6.py
Normal file
70
custom_components/midea_auto_cloud/device_mapping/T0xE6.py
Normal file
@@ -0,0 +1,70 @@
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
from homeassistant.const import Platform, UnitOfElectricPotential, UnitOfTemperature, UnitOfTime, UnitOfPressure
|
||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||
|
||||
DEVICE_MAPPING = {
|
||||
"default": {
|
||||
"rationale": ["off", "on"],
|
||||
"queries": [{}],
|
||||
"entities": {
|
||||
Platform.SWITCH: {
|
||||
"winter_mode": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"summer_mode": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"power": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"heat_exchanger": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"fan_type": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"ignitor_output": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"fan_output": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"current_heat_set_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"current_bath_set_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"heat_out_water_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"bath_out_water_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"water_gage": {
|
||||
"unit_of_measurement": UnitOfPressure.PA,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
},
|
||||
Platform.BINARY_SENSOR: {
|
||||
"heating_work": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING
|
||||
},
|
||||
"bathing_work": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -117,11 +117,16 @@ DEVICE_MAPPING = {
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"water_consumption_ml": {
|
||||
"water_consumption": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.LITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"water_consumption_ml": {
|
||||
"device_class": SensorDeviceClass.VOLUME,
|
||||
"unit_of_measurement": UnitOfVolume.MILLILITERS,
|
||||
"state_class": SensorStateClass.TOTAL_INCREASING
|
||||
},
|
||||
"keep_warm_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.MINUTES,
|
||||
@@ -246,11 +251,23 @@ DEVICE_MAPPING = {
|
||||
"velocity": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"error": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
"life_1": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
},
|
||||
"category": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
"life_2": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.DAYS,
|
||||
},
|
||||
"in_tds": {
|
||||
"device_class": SensorDeviceClass.WATER,
|
||||
"unit_of_measurement": "mg/L",
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"out_tds": {
|
||||
"device_class": SensorDeviceClass.WATER,
|
||||
"unit_of_measurement": "mg/L",
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -123,6 +123,12 @@
|
||||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"heating_work": {
|
||||
"name": "Heating Work"
|
||||
},
|
||||
"bathing_work": {
|
||||
"name": "Bathing Work"
|
||||
},
|
||||
"doorswitch": {
|
||||
"name": "Door Switch"
|
||||
},
|
||||
@@ -1395,6 +1401,48 @@
|
||||
"ud_diy_up_percent": {
|
||||
"name": "UD DIY Up Percent"
|
||||
},
|
||||
"heat_exchanger": {
|
||||
"name": "Heat Exchanger Mode"
|
||||
},
|
||||
"fan_type": {
|
||||
"name": "Fan Type"
|
||||
},
|
||||
"ignitor_output": {
|
||||
"name": "Ignitor Output"
|
||||
},
|
||||
"fan_output": {
|
||||
"name": "Fan Output"
|
||||
},
|
||||
"current_heat_set_temperature": {
|
||||
"name": "Current Heat Set Temperature"
|
||||
},
|
||||
"current_bath_set_temperature": {
|
||||
"name": "Current Bath Set Temperature"
|
||||
},
|
||||
"heat_out_water_temperature": {
|
||||
"name": "Heat Out Water Temperature"
|
||||
},
|
||||
"bath_out_water_temperature": {
|
||||
"name": "Bath Out Water Temperature"
|
||||
},
|
||||
"water_gage": {
|
||||
"name": "Water Gage"
|
||||
},
|
||||
"in_tds": {
|
||||
"name": "In TDS"
|
||||
},
|
||||
"out_tds": {
|
||||
"name": "Out TDS"
|
||||
},
|
||||
"life_1": {
|
||||
"name": "RO Filter Cartridge Lifespan"
|
||||
},
|
||||
"life_2": {
|
||||
"name": "MPC Filter Cartridge Lifespan"
|
||||
},
|
||||
"water_consumption": {
|
||||
"name": "Water Consumption"
|
||||
},
|
||||
"water_consumption_ml": {
|
||||
"name": "Water Consumption (ml)"
|
||||
},
|
||||
@@ -1580,6 +1628,12 @@
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"winter_mode": {
|
||||
"name": "Winter Mode"
|
||||
},
|
||||
"summer_mode": {
|
||||
"name": "Summer Mode"
|
||||
},
|
||||
"follow_body_sense": {
|
||||
"name": "Follow Body Sense"
|
||||
},
|
||||
|
||||
@@ -123,6 +123,12 @@
|
||||
},
|
||||
"entity": {
|
||||
"binary_sensor": {
|
||||
"heating_work": {
|
||||
"name": "采暖功能状态"
|
||||
},
|
||||
"bathing_work": {
|
||||
"name": "生活热水工作状态"
|
||||
},
|
||||
"doorswitch": {
|
||||
"name": "门锁开关"
|
||||
},
|
||||
@@ -1399,6 +1405,48 @@
|
||||
"ud_diy_up_percent": {
|
||||
"name": "上下自定义上百分比"
|
||||
},
|
||||
"heat_exchanger": {
|
||||
"name": "采暖模式"
|
||||
},
|
||||
"fan_type": {
|
||||
"name": "风机模式"
|
||||
},
|
||||
"ignitor_output": {
|
||||
"name": "点火状态"
|
||||
},
|
||||
"fan_output": {
|
||||
"name": "风机状态"
|
||||
},
|
||||
"current_heat_set_temperature": {
|
||||
"name": "当前采暖设定温度"
|
||||
},
|
||||
"current_bath_set_temperature": {
|
||||
"name": "当前生活热水设定温度"
|
||||
},
|
||||
"heat_out_water_temperature": {
|
||||
"name": "采暖出水实际温度"
|
||||
},
|
||||
"bath_out_water_temperature": {
|
||||
"name": "生活用水出水实际温度"
|
||||
},
|
||||
"water_gage": {
|
||||
"name": "水压"
|
||||
},
|
||||
"in_tds": {
|
||||
"name": "进水TDS"
|
||||
},
|
||||
"out_tds": {
|
||||
"name": "出水TDS"
|
||||
},
|
||||
"life_1": {
|
||||
"name": "RO滤芯寿命"
|
||||
},
|
||||
"life_2": {
|
||||
"name": "MPC滤芯寿命"
|
||||
},
|
||||
"water_consumption": {
|
||||
"name": "用水量"
|
||||
},
|
||||
"water_consumption_ml": {
|
||||
"name": "用水量(毫升)"
|
||||
},
|
||||
@@ -1584,6 +1632,12 @@
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"winter_mode": {
|
||||
"name": "冬季模式"
|
||||
},
|
||||
"summer_mode": {
|
||||
"name": "夏季模式"
|
||||
},
|
||||
"follow_body_sense": {
|
||||
"name": "随身感"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user