mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-11-12 07:51:54 +00:00
feat: add support for T0xFA.
This commit is contained in:
@@ -45,7 +45,7 @@ DEVICE_MAPPING = {
|
|||||||
Platform.FAN: {
|
Platform.FAN: {
|
||||||
"fan": {
|
"fan": {
|
||||||
"power": "fan_power",
|
"power": "fan_power",
|
||||||
"fan_speed": [
|
"speeds": [
|
||||||
{"fan_speed": "1"},
|
{"fan_speed": "1"},
|
||||||
{"fan_speed": "2"},
|
{"fan_speed": "2"},
|
||||||
{"fan_speed": "3"},
|
{"fan_speed": "3"},
|
||||||
|
|||||||
@@ -8,34 +8,38 @@ DEVICE_MAPPING = {
|
|||||||
"rationale": ["off", "on"],
|
"rationale": ["off", "on"],
|
||||||
"queries": [{}],
|
"queries": [{}],
|
||||||
"centralized": [
|
"centralized": [
|
||||||
"power", "humidify", "swing", "anion", "display_on_off",
|
"power", "swing", "display_on_off", "temp_wind_switch",
|
||||||
"dust_reset", "temp_wind_switch", "filter_reset"
|
|
||||||
],
|
],
|
||||||
"entities": {
|
"entities": {
|
||||||
Platform.BINARY_SENSOR: {
|
Platform.SWITCH: {
|
||||||
"power": {
|
|
||||||
"device_class": BinarySensorDeviceClass.POWER,
|
|
||||||
},
|
|
||||||
"humidify": {
|
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
|
||||||
},
|
|
||||||
"swing": {
|
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
|
||||||
},
|
|
||||||
"anion": {
|
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
|
||||||
},
|
|
||||||
"display_on_off": {
|
"display_on_off": {
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
},
|
"rationale": ["on", "off"]
|
||||||
"dust_reset": {
|
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
|
||||||
},
|
},
|
||||||
"temp_wind_switch": {
|
"temp_wind_switch": {
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
"device_class": SwitchDeviceClass.SWITCH,
|
||||||
},
|
},
|
||||||
"filter_reset": {
|
},
|
||||||
"device_class": BinarySensorDeviceClass.RUNNING,
|
Platform.FAN: {
|
||||||
|
"fan": {
|
||||||
|
"power": "power",
|
||||||
|
"speeds": [
|
||||||
|
{"gear": "1"},
|
||||||
|
{"gear": "2"},
|
||||||
|
{"gear": "3"},
|
||||||
|
{"gear": "4"},
|
||||||
|
{"gear": "5"},
|
||||||
|
{"gear": "6"},
|
||||||
|
{"gear": "7"},
|
||||||
|
{"gear": "8"},
|
||||||
|
{"gear": "9"},
|
||||||
|
],
|
||||||
|
"oscillate": "swing",
|
||||||
|
"preset_modes": {
|
||||||
|
"normal": {"mode": "normal"},
|
||||||
|
"sleep": {"mode": "sleep"},
|
||||||
|
"baby": {"mode": "baby"}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Platform.SELECT: {
|
Platform.SELECT: {
|
||||||
@@ -65,16 +69,6 @@ DEVICE_MAPPING = {
|
|||||||
"both": {"swing_direction": "both"}
|
"both": {"swing_direction": "both"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scene": {
|
|
||||||
"options": {
|
|
||||||
"none": {"scene": "none"},
|
|
||||||
"auto": {"scene": "auto"},
|
|
||||||
"sleep": {"scene": "sleep"},
|
|
||||||
"work": {"scene": "work"},
|
|
||||||
"study": {"scene": "study"},
|
|
||||||
"party": {"scene": "party"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"sleep_sensor": {
|
"sleep_sensor": {
|
||||||
"options": {
|
"options": {
|
||||||
"none": {"sleep_sensor": "none"},
|
"none": {"sleep_sensor": "none"},
|
||||||
@@ -83,27 +77,6 @@ DEVICE_MAPPING = {
|
|||||||
"both": {"sleep_sensor": "both"}
|
"both": {"sleep_sensor": "both"}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mode": {
|
|
||||||
"options": {
|
|
||||||
"normal": {"mode": "normal"},
|
|
||||||
"auto": {"mode": "auto"},
|
|
||||||
"manual": {"mode": "manual"},
|
|
||||||
"sleep": {"mode": "sleep"},
|
|
||||||
"turbo": {"mode": "turbo"},
|
|
||||||
"quiet": {"mode": "quiet"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"gear": {
|
|
||||||
"options": {
|
|
||||||
"1": {"gear": "1"},
|
|
||||||
"2": {"gear": "2"},
|
|
||||||
"3": {"gear": "3"},
|
|
||||||
"4": {"gear": "4"},
|
|
||||||
"5": {"gear": "5"},
|
|
||||||
"6": {"gear": "6"},
|
|
||||||
"auto": {"gear": "auto"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
Platform.SENSOR: {
|
Platform.SENSOR: {
|
||||||
"real_gear": {
|
"real_gear": {
|
||||||
@@ -120,19 +93,6 @@ DEVICE_MAPPING = {
|
|||||||
"unit_of_measurement": UnitOfTime.HOURS,
|
"unit_of_measurement": UnitOfTime.HOURS,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"battery_status": {
|
|
||||||
"device_class": SensorDeviceClass.BATTERY,
|
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
|
||||||
},
|
|
||||||
"battery_level": {
|
|
||||||
"device_class": SensorDeviceClass.BATTERY,
|
|
||||||
"unit_of_measurement": PERCENTAGE,
|
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
|
||||||
},
|
|
||||||
"error_code": {
|
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
|
||||||
},
|
|
||||||
"temperature_feedback": {
|
"temperature_feedback": {
|
||||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||||
@@ -162,10 +122,6 @@ DEVICE_MAPPING = {
|
|||||||
"unit_of_measurement": UnitOfTime.MINUTES,
|
"unit_of_measurement": UnitOfTime.MINUTES,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"version": {
|
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
|
||||||
},
|
|
||||||
"pm25": {
|
"pm25": {
|
||||||
"device_class": SensorDeviceClass.PM25,
|
"device_class": SensorDeviceClass.PM25,
|
||||||
"unit_of_measurement": "µg/m³",
|
"unit_of_measurement": "µg/m³",
|
||||||
@@ -176,22 +132,22 @@ DEVICE_MAPPING = {
|
|||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"lr_diy_down_percent": {
|
"lr_diy_down_percent": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.BATTERY,
|
||||||
"unit_of_measurement": PERCENTAGE,
|
"unit_of_measurement": PERCENTAGE,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"lr_diy_up_percent": {
|
"lr_diy_up_percent": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.BATTERY,
|
||||||
"unit_of_measurement": PERCENTAGE,
|
"unit_of_measurement": PERCENTAGE,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"ud_diy_down_percent": {
|
"ud_diy_down_percent": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.BATTERY,
|
||||||
"unit_of_measurement": PERCENTAGE,
|
"unit_of_measurement": PERCENTAGE,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
},
|
},
|
||||||
"ud_diy_up_percent": {
|
"ud_diy_up_percent": {
|
||||||
"device_class": SensorDeviceClass.ENUM,
|
"device_class": SensorDeviceClass.BATTERY,
|
||||||
"unit_of_measurement": PERCENTAGE,
|
"unit_of_measurement": PERCENTAGE,
|
||||||
"state_class": SensorStateClass.MEASUREMENT
|
"state_class": SensorStateClass.MEASUREMENT
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -291,30 +291,6 @@
|
|||||||
"execute": {
|
"execute": {
|
||||||
"name": "Execute"
|
"name": "Execute"
|
||||||
},
|
},
|
||||||
"power": {
|
|
||||||
"name": "Power"
|
|
||||||
},
|
|
||||||
"humidify": {
|
|
||||||
"name": "Humidify"
|
|
||||||
},
|
|
||||||
"swing": {
|
|
||||||
"name": "Swing"
|
|
||||||
},
|
|
||||||
"anion": {
|
|
||||||
"name": "Anion"
|
|
||||||
},
|
|
||||||
"display_on_off": {
|
|
||||||
"name": "Display On/Off"
|
|
||||||
},
|
|
||||||
"dust_reset": {
|
|
||||||
"name": "Dust Reset"
|
|
||||||
},
|
|
||||||
"temp_wind_switch": {
|
|
||||||
"name": "Temp Wind Switch"
|
|
||||||
},
|
|
||||||
"filter_reset": {
|
|
||||||
"name": "Filter Reset"
|
|
||||||
},
|
|
||||||
"heat_status": {
|
"heat_status": {
|
||||||
"name": "Heat Status"
|
"name": "Heat Status"
|
||||||
},
|
},
|
||||||
@@ -1539,6 +1515,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"switch": {
|
"switch": {
|
||||||
|
"temp_wind_switch": {
|
||||||
|
"name": "Wind Change with Temperature"
|
||||||
|
},
|
||||||
"screen_close": {
|
"screen_close": {
|
||||||
"name": "Screen Close"
|
"name": "Screen Close"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -291,30 +291,6 @@
|
|||||||
"execute": {
|
"execute": {
|
||||||
"name": "执行"
|
"name": "执行"
|
||||||
},
|
},
|
||||||
"power": {
|
|
||||||
"name": "电源"
|
|
||||||
},
|
|
||||||
"humidify": {
|
|
||||||
"name": "加湿"
|
|
||||||
},
|
|
||||||
"swing": {
|
|
||||||
"name": "摆风"
|
|
||||||
},
|
|
||||||
"anion": {
|
|
||||||
"name": "负离子"
|
|
||||||
},
|
|
||||||
"display_on_off": {
|
|
||||||
"name": "显示开关"
|
|
||||||
},
|
|
||||||
"dust_reset": {
|
|
||||||
"name": "灰尘重置"
|
|
||||||
},
|
|
||||||
"temp_wind_switch": {
|
|
||||||
"name": "温风开关"
|
|
||||||
},
|
|
||||||
"filter_reset": {
|
|
||||||
"name": "滤网重置"
|
|
||||||
},
|
|
||||||
"heat_status": {
|
"heat_status": {
|
||||||
"name": "加热状态"
|
"name": "加热状态"
|
||||||
},
|
},
|
||||||
@@ -1543,6 +1519,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"switch": {
|
"switch": {
|
||||||
|
"temp_wind_switch": {
|
||||||
|
"name": "风随温变"
|
||||||
|
},
|
||||||
"screen_close": {
|
"screen_close": {
|
||||||
"name": "屏幕关闭"
|
"name": "屏幕关闭"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user