mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-11-12 07:51:54 +00:00
feat: add device support for T0xFB.
This commit is contained in:
@@ -41,6 +41,7 @@ Get devices from MSmartHome/Midea Meiju homes through the network and control th
|
||||
- T0xEA Rice Cooker
|
||||
- T0xED Water Softener
|
||||
- T0xFA Electric Fan
|
||||
- T0xFB Electric Heater
|
||||
- T0xFD Humidifier
|
||||
|
||||
Welcome to collaborate on adding support for more devices.
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
- T0xEA 电饭锅
|
||||
- T0xED 软水机
|
||||
- T0xFA 电风扇
|
||||
- T0xFB 电暖器
|
||||
- T0xFD 加湿器
|
||||
|
||||
欢迎合作开发添加更多设备支持。
|
||||
|
||||
53
custom_components/midea_auto_cloud/device_mapping/T0xFB.py
Normal file
53
custom_components/midea_auto_cloud/device_mapping/T0xFB.py
Normal file
@@ -0,0 +1,53 @@
|
||||
from homeassistant.const import Platform, UnitOfTemperature, UnitOfVolume, UnitOfTime, PERCENTAGE, PRECISION_HALVES, \
|
||||
UnitOfEnergy, UnitOfPower
|
||||
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: {
|
||||
"lock": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"screen_close": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.CLIMATE: {
|
||||
"electric_heater": {
|
||||
"power": "power",
|
||||
"hvac_modes": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on"}
|
||||
},
|
||||
"target_temperature": "temperature",
|
||||
"current_temperature": "cur_temperature",
|
||||
"min_temp": 5,
|
||||
"max_temp": 35,
|
||||
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||
"precision": PRECISION_HALVES,
|
||||
}
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"gear": {
|
||||
"options": {
|
||||
"low": {"gear": 1},
|
||||
"high": {"gear": 3}
|
||||
}
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"power_statistics": {
|
||||
"device_class": SensorDeviceClass.POWER,
|
||||
"unit_of_measurement": UnitOfPower.WATT,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -359,6 +359,9 @@
|
||||
},
|
||||
"water_heater": {
|
||||
"name": "Water Heater"
|
||||
},
|
||||
"electric_heater": {
|
||||
"name": "Electric Heater"
|
||||
}
|
||||
},
|
||||
"humidifier": {
|
||||
@@ -1530,6 +1533,9 @@
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"screen_close": {
|
||||
"name": "Screen Close"
|
||||
},
|
||||
"anion": {
|
||||
"name": "Anion"
|
||||
},
|
||||
|
||||
@@ -363,6 +363,9 @@
|
||||
},
|
||||
"water_heater": {
|
||||
"name": "热水器"
|
||||
},
|
||||
"electric_heater": {
|
||||
"name": "取暖器"
|
||||
}
|
||||
},
|
||||
"humidifier": {
|
||||
@@ -1534,6 +1537,9 @@
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"screen_close": {
|
||||
"name": "屏幕关闭"
|
||||
},
|
||||
"anion": {
|
||||
"name": "负离子"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user