mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-11-12 16:01:54 +00:00
feat: add device support for T0x3D.
This commit is contained in:
@@ -21,6 +21,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th
|
|||||||
- T0x13 Electric Light
|
- T0x13 Electric Light
|
||||||
- T0x21 Central Air Conditioning Gateway
|
- T0x21 Central Air Conditioning Gateway
|
||||||
- T0x26 Bath Heater
|
- T0x26 Bath Heater
|
||||||
|
- T0x3D Water Heater
|
||||||
- T0xA1 Dehumidifier
|
- T0xA1 Dehumidifier
|
||||||
- T0xAC Air Conditioner
|
- T0xAC Air Conditioner
|
||||||
- T0xB2 Electric Steamer
|
- T0xB2 Electric Steamer
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
- T0x13 电灯
|
- T0x13 电灯
|
||||||
- T0x21 中央空调网关
|
- T0x21 中央空调网关
|
||||||
- T0x26 浴霸
|
- T0x26 浴霸
|
||||||
|
- T0x3D 电热水瓶
|
||||||
- T0xA1 除湿机
|
- T0xA1 除湿机
|
||||||
- T0xAC 空调
|
- T0xAC 空调
|
||||||
- T0xB2 电蒸箱
|
- T0xB2 电蒸箱
|
||||||
|
|||||||
48
custom_components/midea_auto_cloud/device_mapping/T0x3D.py
Normal file
48
custom_components/midea_auto_cloud/device_mapping/T0x3D.py
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -373,6 +373,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
|
"warm_target_temp": {
|
||||||
|
"name": "Warm Target Temperature"
|
||||||
|
},
|
||||||
|
"boil_target_temp": {
|
||||||
|
"name": "Boil Target Temperature"
|
||||||
|
},
|
||||||
"add_rinse": {
|
"add_rinse": {
|
||||||
"name": "Add Rinse"
|
"name": "Add Rinse"
|
||||||
},
|
},
|
||||||
@@ -2387,6 +2393,33 @@
|
|||||||
},
|
},
|
||||||
"is_lock_rc": {
|
"is_lock_rc": {
|
||||||
"name": "Remote Control Lock"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,6 +377,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"select": {
|
"select": {
|
||||||
|
"warm_target_temp": {
|
||||||
|
"name": "保温目标温度"
|
||||||
|
},
|
||||||
|
"boil_target_temp": {
|
||||||
|
"name": "煮沸目标温度"
|
||||||
|
},
|
||||||
"add_rinse": {
|
"add_rinse": {
|
||||||
"name": "加漂洗"
|
"name": "加漂洗"
|
||||||
},
|
},
|
||||||
@@ -2391,6 +2397,33 @@
|
|||||||
},
|
},
|
||||||
"is_lock_rc": {
|
"is_lock_rc": {
|
||||||
"name": "遥控锁定"
|
"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": "工作开关"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user