mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-11-12 07:51:54 +00:00
feat: add support for device T0x15.
This commit is contained in:
@@ -19,6 +19,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th
|
|||||||
## Currently Supported Device Types
|
## Currently Supported Device Types
|
||||||
|
|
||||||
- T0x13 Electric Light
|
- T0x13 Electric Light
|
||||||
|
- T0x15 Water Heater
|
||||||
- T0x21 Central Air Conditioning Gateway
|
- T0x21 Central Air Conditioning Gateway
|
||||||
- T0x26 Bath Heater
|
- T0x26 Bath Heater
|
||||||
- T0x3D Water Heater
|
- T0x3D Water Heater
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
## 目前支持的设备类型
|
## 目前支持的设备类型
|
||||||
|
|
||||||
- T0x13 电灯
|
- T0x13 电灯
|
||||||
|
- T0x15 养生壶
|
||||||
- T0x21 中央空调网关
|
- T0x21 中央空调网关
|
||||||
- T0x26 浴霸
|
- T0x26 浴霸
|
||||||
- T0x3D 电热水瓶
|
- T0x3D 电热水瓶
|
||||||
|
|||||||
60
custom_components/midea_auto_cloud/device_mapping/T0x15.py
Normal file
60
custom_components/midea_auto_cloud/device_mapping/T0x15.py
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
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": ["warm_target_temp", "boil_target_temp", "meate_select", "max_work_time", "warm_time_min"],
|
||||||
|
"entities": {
|
||||||
|
Platform.BINARY_SENSOR: {
|
||||||
|
"islack_water": {
|
||||||
|
"device_class": BinarySensorDeviceClass.PROBLEM,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
# Platform.NUMBER: {
|
||||||
|
# "warm_time_min": {
|
||||||
|
# "min": 0,
|
||||||
|
# "max": 480,
|
||||||
|
# "step": 60
|
||||||
|
# },
|
||||||
|
# "max_work_time": {
|
||||||
|
# "min": 0,
|
||||||
|
# "max": 12,
|
||||||
|
# "step": 1
|
||||||
|
# },
|
||||||
|
# "warm_target_temp": {
|
||||||
|
# "min": 0,
|
||||||
|
# "max": 100,
|
||||||
|
# "step": 1
|
||||||
|
# },
|
||||||
|
# "boil_target_temp": {
|
||||||
|
# "min": 0,
|
||||||
|
# "max": 100,
|
||||||
|
# "step": 1
|
||||||
|
# },
|
||||||
|
# },
|
||||||
|
Platform.SELECT: {
|
||||||
|
"work_mode": {
|
||||||
|
"options": {
|
||||||
|
"取消": {"work_mode": "0", "work_switch": "cancel"},
|
||||||
|
"烧水": {"work_mode": "1", "work_switch": "start"},
|
||||||
|
"除氯": {"work_mode": "2", "work_switch": "start"},
|
||||||
|
"花草茶": {"work_mode": "4", "work_switch": "start"},
|
||||||
|
"养生汤": {"work_mode": "5", "work_switch": "start"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Platform.SENSOR: {
|
||||||
|
"current_temp": {
|
||||||
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -66,30 +66,30 @@ DEVICE_MAPPING = {
|
|||||||
Platform.SELECT: {
|
Platform.SELECT: {
|
||||||
"mode": {
|
"mode": {
|
||||||
"options": {
|
"options": {
|
||||||
"Rice": {"mode": "essence_rice", "work_status": "cooking"},
|
"精华饭": {"mode": "essence_rice", "work_status": "cooking"},
|
||||||
"Porridge": {"mode": "gruel", "work_status": "cooking"},
|
"稀饭": {"mode": "gruel", "work_status": "cooking"},
|
||||||
"热饭": {"mode": "heat_rice", "work_status": "cooking"},
|
"热饭": {"mode": "heat_rice", "work_status": "cooking"},
|
||||||
"Congee": {"mode": "boil_congee", "work_status": "cooking"},
|
"煮粥": {"mode": "boil_congee", "work_status": "cooking"},
|
||||||
"Soup": {"mode": "cook_soup", "work_status": "cooking"},
|
"煲汤": {"mode": "cook_soup", "work_status": "cooking"},
|
||||||
"Steam": {"mode": "stewing", "work_status": "cooking"},
|
"蒸煮": {"mode": "stewing", "work_status": "cooking"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rice_type": {
|
"rice_type": {
|
||||||
"options": {
|
"options": {
|
||||||
"None": {"rice_type": "none"},
|
"无": {"rice_type": "none"},
|
||||||
"Northeast rice": {"rice_type": "northeast"},
|
"东北大米": {"rice_type": "northeast"},
|
||||||
"Long-grain rice": {"rice_type": "longrain"},
|
"长粒米": {"rice_type": "longrain"},
|
||||||
"Fragrant rice": {"rice_type": "fragrant"},
|
"香米": {"rice_type": "fragrant"},
|
||||||
"Wuchang rice": {"rice_type": "five"},
|
"五常大米": {"rice_type": "five"},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"work_status": {
|
"work_status": {
|
||||||
"options": {
|
"options": {
|
||||||
"Stop": {"work_status": "cancel"},
|
"停止": {"work_status": "cancel"},
|
||||||
"Cooking": {"work_status": "cooking"},
|
"烹饪": {"work_status": "cooking"},
|
||||||
"Warming": {"work_status": "keep_warm"},
|
"保温": {"work_status": "keep_warm"},
|
||||||
"Soaking": {"work_status": "awakening_rice"},
|
"醒米": {"work_status": "awakening_rice"},
|
||||||
"Delay": {"work_status": "schedule"}
|
"预约": {"work_status": "schedule"}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user