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": {
|
||||
|
||||
Reference in New Issue
Block a user