feat: add device support for T0x3D.

This commit is contained in:
sususweet
2025-10-27 23:05:30 +08:00
parent 171d76ee3e
commit c503b14d33
5 changed files with 117 additions and 1 deletions

View File

@@ -21,6 +21,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th
- T0x13 Electric Light
- T0x21 Central Air Conditioning Gateway
- T0x26 Bath Heater
- T0x3D Water Heater
- T0xA1 Dehumidifier
- T0xAC Air Conditioner
- T0xB2 Electric Steamer

View File

@@ -20,7 +20,8 @@
- T0x13 电灯
- T0x21 中央空调网关
- T0x26 浴霸
- T0x26 浴霸
- T0x3D 电热水瓶
- T0xA1 除湿机
- T0xAC 空调
- T0xB2 电蒸箱

View File

@@ -0,0 +1,48 @@
from homeassistant.const import Platform, UnitOfTemperature, UnitOfVolume, UnitOfTime, PERCENTAGE, PRECISION_HALVES, \
UnitOfEnergy, UnitOfPower, PRECISION_WHOLE
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
from homeassistant.components.switch import SwitchDeviceClass
DEVICE_MAPPING = {
"default": {
"rationale": ["off", "on"],
"queries": [{}],
"centralized": [],
"entities": {
Platform.SWITCH: {
"work_switch": {
"device_class": SwitchDeviceClass.SWITCH,
"rationale": ['cancel', 'work']
}
},
Platform.SELECT: {
"warm_target_temp": {
"options": {
"45℃": {"warm_target_temp": "45"},
"55℃": {"warm_target_temp": "55"},
"65℃": {"warm_target_temp": "65"},
"75℃": {"warm_target_temp": "75"},
"85℃": {"warm_target_temp": "85"}
}
},
"boil_target_temp": {
"options": {
"45℃": {"boil_target_temp": "45"},
"55℃": {"boil_target_temp": "55"},
"65℃": {"boil_target_temp": "65"},
"75℃": {"boil_target_temp": "75"},
"85℃": {"boil_target_temp": "85"}
}
}
},
Platform.SENSOR: {
"cur_temp": {
"device_class": SensorDeviceClass.TEMPERATURE,
"unit_of_measurement": UnitOfTemperature.CELSIUS,
"state_class": SensorStateClass.MEASUREMENT
}
}
}
}
}

View File

@@ -373,6 +373,12 @@
}
},
"select": {
"warm_target_temp": {
"name": "Warm Target Temperature"
},
"boil_target_temp": {
"name": "Boil Target Temperature"
},
"add_rinse": {
"name": "Add Rinse"
},
@@ -2387,6 +2393,33 @@
},
"is_lock_rc": {
"name": "Remote Control Lock"
},
"endpoint_1_onoff": {
"name": "Button 1"
},
"endpoint_2_onoff": {
"name": "Button 2"
},
"endpoint_3_onoff": {
"name": "Button 3"
},
"endpoint_4_onoff": {
"name": "Button 4"
},
"endpoint_5_onoff": {
"name": "Button 5"
},
"endpoint_6_onoff": {
"name": "Button 6"
},
"endpoint_7_onoff": {
"name": "Button 7"
},
"endpoint_8_onoff": {
"name": "Button 8"
},
"work_switch": {
"name": "Work Switch"
}
}
}

View File

@@ -377,6 +377,12 @@
}
},
"select": {
"warm_target_temp": {
"name": "保温目标温度"
},
"boil_target_temp": {
"name": "煮沸目标温度"
},
"add_rinse": {
"name": "加漂洗"
},
@@ -2391,6 +2397,33 @@
},
"is_lock_rc": {
"name": "遥控锁定"
},
"endpoint_1_onoff": {
"name": "按键一"
},
"endpoint_2_onoff": {
"name": "按键二"
},
"endpoint_3_onoff": {
"name": "按键三"
},
"endpoint_4_onoff": {
"name": "按键四"
},
"endpoint_5_onoff": {
"name": "按键五"
},
"endpoint_6_onoff": {
"name": "按键六"
},
"endpoint_7_onoff": {
"name": "按键七"
},
"endpoint_8_onoff": {
"name": "按键八"
},
"work_switch": {
"name": "工作开关"
}
}
}