mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-12-22 12:27:12 +00:00
feat: add control protocol v2 for T0xB6.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from homeassistant.components.playstation_network.media_player import PLATFORM_MAP
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorStateClass
|
||||
from homeassistant.const import Platform, UnitOfPower, UnitOfElectricPotential
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
@@ -6,7 +7,7 @@ DEVICE_MAPPING = {
|
||||
"default": {
|
||||
"rationale": ["off", "on"],
|
||||
"queries": [{}],
|
||||
"centralized": [],
|
||||
"centralized": ["lightness"],
|
||||
"calculate": {
|
||||
"get": [
|
||||
{
|
||||
@@ -28,9 +29,6 @@ DEVICE_MAPPING = {
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"error_code": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"b7_left_status": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
"translation_key": "left_status",
|
||||
@@ -46,6 +44,28 @@ DEVICE_MAPPING = {
|
||||
"translation_key": "battery_voltage",
|
||||
}
|
||||
},
|
||||
Platform.BUTTON: {
|
||||
"light_off": {
|
||||
"command": {"electronic_control_version": 2, "type": "b6", "b6_action": "setting",
|
||||
"setting": "light", "light": "off"},
|
||||
},
|
||||
"light_on": {
|
||||
"command": {"electronic_control_version": 2, "type": "b6", "b6_action": "setting",
|
||||
"setting": "light", "light": "on"},
|
||||
},
|
||||
"left_stove_off": {
|
||||
"command": {"electronic_control_version": 2, "type": "b7", "b7_work_burner_control": 1,
|
||||
"b7_function_control": 1},
|
||||
},
|
||||
"right_stove_off": {
|
||||
"command": {"electronic_control_version": 2, "type": "b7", "b7_work_burner_control": 2,
|
||||
"b7_function_control": 1},
|
||||
},
|
||||
"middle_stove_off": {
|
||||
"command": {"electronic_control_version": 2, "type": "b7", "b7_work_burner_control": 3,
|
||||
"b7_function_control": 1},
|
||||
}
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"wind_pressure": {
|
||||
"options": {
|
||||
|
||||
@@ -122,6 +122,23 @@
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"button": {
|
||||
"light_off": {
|
||||
"name": "Light off"
|
||||
},
|
||||
"light_on": {
|
||||
"name": "Light on"
|
||||
},
|
||||
"left_stove_off": {
|
||||
"name": "Left stove off"
|
||||
},
|
||||
"right_stove_off": {
|
||||
"name": "Right stove off"
|
||||
},
|
||||
"middle_stove_off": {
|
||||
"name": "Middle stove off"
|
||||
}
|
||||
},
|
||||
"binary_sensor": {
|
||||
"heating_work": {
|
||||
"name": "Heating Work Status"
|
||||
@@ -2775,6 +2792,9 @@
|
||||
"endpoint_8_onoff": {
|
||||
"name": "Button 8"
|
||||
},
|
||||
"wisdom_wind": {
|
||||
"name": "Wisdom Wind"
|
||||
},
|
||||
"work_switch": {
|
||||
"name": "Work Switch"
|
||||
},
|
||||
|
||||
@@ -122,6 +122,23 @@
|
||||
}
|
||||
},
|
||||
"entity": {
|
||||
"button": {
|
||||
"light_off": {
|
||||
"name": "关闭灯光"
|
||||
},
|
||||
"light_on": {
|
||||
"name": "打开灯光"
|
||||
},
|
||||
"left_stove_off": {
|
||||
"name": "左灶关火"
|
||||
},
|
||||
"right_stove_off": {
|
||||
"name": "右灶关火"
|
||||
},
|
||||
"middle_stove_off": {
|
||||
"name": "中灶关火"
|
||||
}
|
||||
},
|
||||
"binary_sensor": {
|
||||
"heating_work": {
|
||||
"name": "采暖功能状态"
|
||||
@@ -2870,6 +2887,9 @@
|
||||
"endpoint_8_onoff": {
|
||||
"name": "按键八"
|
||||
},
|
||||
"wisdom_wind": {
|
||||
"name": "智能风"
|
||||
},
|
||||
"work_switch": {
|
||||
"name": "工作开关"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user