mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-09-28 02:32:40 +00:00
rename repo
This commit is contained in:
169
custom_components/midea_auto_codec/device_mapping/T0xAC.py
Normal file
169
custom_components/midea_auto_codec/device_mapping/T0xAC.py
Normal file
@@ -0,0 +1,169 @@
|
||||
from homeassistant.const import *
|
||||
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": [{}, {"query_type": "prevent_straight_wind"}],
|
||||
"centralized": [
|
||||
"power", "temperature", "small_temperature", "mode", "eco",
|
||||
"comfort_power_save", "comfort_sleep", "strong_wind",
|
||||
"wind_swing_lr", "wind_swing_lr", "wind_speed","ptc", "dry"
|
||||
],
|
||||
"entities": {
|
||||
Platform.CLIMATE: {
|
||||
"thermostat": {
|
||||
"name": "Thermostat",
|
||||
"power": "power",
|
||||
"hvac_modes": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
},
|
||||
"preset_modes": {
|
||||
"none": {
|
||||
"eco": "off",
|
||||
"comfort_power_save": "off",
|
||||
"comfort_sleep": "off",
|
||||
"strong_wind": "off"
|
||||
},
|
||||
"eco": {"eco": "on"},
|
||||
"comfort": {"comfort_power_save": "on"},
|
||||
"sleep": {"comfort_sleep": "on"},
|
||||
"boost": {"strong_wind": "on"}
|
||||
},
|
||||
"swing_modes": {
|
||||
"off": {"wind_swing_lr": "off", "wind_swing_ud": "off"},
|
||||
"both": {"wind_swing_lr": "on", "wind_swing_ud": "on"},
|
||||
"horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"},
|
||||
"vertical": {"wind_swing_lr": "off", "wind_swing_ud": "on"},
|
||||
},
|
||||
"fan_modes": {
|
||||
"silent": {"wind_speed": 20},
|
||||
"low": {"wind_speed": 40},
|
||||
"medium": {"wind_speed": 60},
|
||||
"high": {"wind_speed": 80},
|
||||
"full": {"wind_speed": 100},
|
||||
"auto": {"wind_speed": 102}
|
||||
},
|
||||
"target_temperature": ["temperature", "small_temperature"],
|
||||
"current_temperature": "indoor_temperature",
|
||||
"aux_heat": "ptc",
|
||||
"min_temp": 17,
|
||||
"max_temp": 30,
|
||||
"temperature_unit": TEMP_CELSIUS,
|
||||
"precision": PRECISION_HALVES,
|
||||
}
|
||||
},
|
||||
Platform.SWITCH: {
|
||||
"dry": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"prevent_straight_wind": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": [1, 2]
|
||||
},
|
||||
"aux_heat": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"indoor_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"outdoor_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
"22012227": {
|
||||
"rationale": ["off", "on"],
|
||||
"queries": [{}, {"query_type": "prevent_straight_wind"}],
|
||||
"centralized": ["power", "temperature", "small_temperature", "mode", "eco", "comfort_power_save",
|
||||
"comfort_sleep", "strong_wind", "wind_swing_lr", "wind_swing_ud", "wind_speed",
|
||||
"ptc", "dry"],
|
||||
|
||||
"entities": {
|
||||
Platform.CLIMATE: {
|
||||
"thermostat": {
|
||||
"name": "Thermostat",
|
||||
"power": "power",
|
||||
"hvac_modes": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
},
|
||||
"preset_modes": {
|
||||
"none": {
|
||||
"eco": "off",
|
||||
"comfort_power_save": "off",
|
||||
"comfort_sleep": "off",
|
||||
"strong_wind": "off"
|
||||
},
|
||||
"eco": {"eco": "on"},
|
||||
"comfort": {"comfort_power_save": "on"},
|
||||
"sleep": {"comfort_sleep": "on"},
|
||||
"boost": {"strong_wind": "on"}
|
||||
},
|
||||
"swing_modes": {
|
||||
"off": {"wind_swing_lr": "off", "wind_swing_ud": "off"},
|
||||
"both": {"wind_swing_lr": "on", "wind_swing_ud": "on"},
|
||||
"horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"},
|
||||
"vertical": {"wind_swing_lr": "off", "wind_swing_ud": "on"},
|
||||
},
|
||||
"fan_modes": {
|
||||
"silent": {"wind_speed": 20},
|
||||
"low": {"wind_speed": 40},
|
||||
"medium": {"wind_speed": 60},
|
||||
"high": {"wind_speed": 80},
|
||||
"full": {"wind_speed": 100},
|
||||
"auto": {"wind_speed": 102}
|
||||
},
|
||||
"target_temperature": ["temperature", "small_temperature"],
|
||||
"current_temperature": "indoor_temperature",
|
||||
"aux_heat": "ptc",
|
||||
"min_temp": 17,
|
||||
"max_temp": 30,
|
||||
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||
"precision": PRECISION_HALVES,
|
||||
}
|
||||
},
|
||||
Platform.SWITCH: {
|
||||
"dry": {
|
||||
"name": "干燥",
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"prevent_straight_wind": {
|
||||
"name": "防直吹",
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": [1, 2]
|
||||
},
|
||||
"aux_heat": {
|
||||
"name": "电辅热",
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"outdoor_temperature": {
|
||||
"name": "室外机温度",
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
177
custom_components/midea_auto_codec/device_mapping/T0xEA.py
Normal file
177
custom_components/midea_auto_codec/device_mapping/T0xEA.py
Normal file
@@ -0,0 +1,177 @@
|
||||
from homeassistant.const import *
|
||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||
|
||||
DEVICE_MAPPING = {
|
||||
"default": {
|
||||
"rationale": [0, 1],
|
||||
"calculate": {
|
||||
"get": [
|
||||
{
|
||||
"lvalue": "[remaining_time]",
|
||||
"rvalue": "[left_time_hour] * 60 + [left_time_min]"
|
||||
},
|
||||
{
|
||||
"lvalue": "[warming_time]",
|
||||
"rvalue": "[warm_time_hour] * 60 + [warm_time_min]"
|
||||
},
|
||||
{
|
||||
"lvalue": "[delay_time]",
|
||||
"rvalue": "[order_time_hour] * 60 + [order_time_min]",
|
||||
}
|
||||
],
|
||||
"set": {
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
Platform.SENSOR: {
|
||||
"work_stage": {},
|
||||
"voltage": {
|
||||
"device_class": SensorDeviceClass.VOLTAGE,
|
||||
"unit_of_measurement": UnitOfElectricPotential.VOLT,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"top_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"bottom_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"remaining_time": {
|
||||
"unit_of_measurement": UnitOfTime.MINUTES
|
||||
},
|
||||
"warming_time": {
|
||||
"unit_of_measurement": UnitOfTime.MINUTES
|
||||
},
|
||||
"delay_time": {
|
||||
"unit_of_measurement": UnitOfTime.MINUTES
|
||||
},
|
||||
},
|
||||
Platform.BINARY_SENSOR: {
|
||||
"top_hot": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING
|
||||
},
|
||||
"flank_hot": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING
|
||||
},
|
||||
"bottom_hot": {
|
||||
"device_class": BinarySensorDeviceClass.RUNNING
|
||||
}
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"mode": {
|
||||
"options": {
|
||||
"Rice": {"mode": "essence_rice", "work_status": "cooking"},
|
||||
"Porridge": {"mode": "gruel", "work_status": "cooking"},
|
||||
"热饭": {"mode": "heat_rice", "work_status": "cooking"},
|
||||
"Congee": {"mode": "boil_congee", "work_status": "cooking"},
|
||||
"Soup": {"mode": "cook_soup", "work_status": "cooking"},
|
||||
"Steam": {"mode": "stewing", "work_status": "cooking"},
|
||||
}
|
||||
},
|
||||
"rice_type": {
|
||||
"options": {
|
||||
"None": {"rice_type": "none"},
|
||||
"Northeast rice": {"rice_type": "northeast"},
|
||||
"Long-grain rice": {"rice_type": "longrain"},
|
||||
"Fragrant rice": {"rice_type": "fragrant"},
|
||||
"Wuchang rice": {"rice_type": "five"},
|
||||
}
|
||||
},
|
||||
"work_status": {
|
||||
"options": {
|
||||
"Stop": {"work_status": "cancel"},
|
||||
"Cooking": {"work_status": "cooking"},
|
||||
"Warming": {"work_status": "keep_warm"},
|
||||
"Soaking": {"work_status": "awakening_rice"},
|
||||
"Delay": {"work_status": "schedule"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"61001527": {
|
||||
"rationale": [0, 1],
|
||||
"calculate": {
|
||||
"get": [
|
||||
{
|
||||
"lvalue": "[remaining_time]",
|
||||
"rvalue": "[left_time_hour] * 60 + [left_time_min]"
|
||||
},
|
||||
{
|
||||
"lvalue": "[warming_time]",
|
||||
"rvalue": "[warm_time_hour] * 60 + [warm_time_min]"
|
||||
},
|
||||
{
|
||||
"lvalue": "[delay_time]",
|
||||
"rvalue": "[order_time_hour] * 60 + [order_time_min]",
|
||||
}
|
||||
],
|
||||
"set": {
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
Platform.SENSOR: {
|
||||
"work_stage": {},
|
||||
"voltage": {
|
||||
"device_class": SensorDeviceClass.VOLTAGE,
|
||||
"unit_of_measurement": UnitOfElectricPotential.VOLT,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"top_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"bottom_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"remaining_time": {
|
||||
"unit_of_measurement": UnitOfTime.MINUTES
|
||||
},
|
||||
"warming_time": {
|
||||
"unit_of_measurement": UnitOfTime.MINUTES
|
||||
},
|
||||
"delay_time": {
|
||||
"unit_of_measurement": UnitOfTime.MINUTES
|
||||
},
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"mode": {
|
||||
"options": {
|
||||
"精华饭": {"mode": "essence_rice", "work_status": "cooking"},
|
||||
"稀饭": {"mode": "gruel", "work_status": "cooking"},
|
||||
"热饭": {"mode": "heat_rice", "work_status": "cooking"},
|
||||
"煮粥": {"mode": "boil_congee", "work_status": "cooking"},
|
||||
"煲汤": {"mode": "cook_soup", "work_status": "cooking"},
|
||||
"蒸煮": {"mode": "stewing", "work_status": "cooking"},
|
||||
}
|
||||
},
|
||||
"rice_type": {
|
||||
"options": {
|
||||
"无": {"rice_type": "none"},
|
||||
"东北大米": {"rice_type": "northeast"},
|
||||
"长粒米": {"rice_type": "longrain"},
|
||||
"香米": {"rice_type": "fragrant"},
|
||||
"五常大米": {"rice_type": "five"},
|
||||
}
|
||||
},
|
||||
"work_status": {
|
||||
"options": {
|
||||
"停止": {"work_status": "cancel"},
|
||||
"烹饪": {"work_status": "cooking"},
|
||||
"保温": {"work_status": "keep_warm"},
|
||||
"醒米": {"work_status": "awakening_rice"},
|
||||
"预约": {"work_status": "schedule"},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
267
custom_components/midea_auto_codec/device_mapping/example.py
Normal file
267
custom_components/midea_auto_codec/device_mapping/example.py
Normal file
@@ -0,0 +1,267 @@
|
||||
from homeassistant.const import *
|
||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
|
||||
DEVICE_MAPPING = {
|
||||
"default": {
|
||||
"manufacturer": "小天鹅",
|
||||
"rationale": ["off", "on"],
|
||||
"queries": [{}, {"query_type": "prevent_straight_wind"}],
|
||||
"centralized": [
|
||||
"power", "temperature", "small_temperature", "mode", "eco",
|
||||
"comfort_power_save", "comfort_sleep", "strong_wind",
|
||||
"wind_swing_lr", "wind_swing_lr", "wind_speed","ptc", "dry"
|
||||
],
|
||||
"calculate": {
|
||||
"get": [
|
||||
{
|
||||
"lvalue": "[target_temperature_new]",
|
||||
"rvalue": "[target_temperature] / 2"
|
||||
},
|
||||
{
|
||||
"lvalue": "[current_temperature_new]",
|
||||
"rvalue": "[current_temperature] / 2"
|
||||
}
|
||||
],
|
||||
"set": {
|
||||
{
|
||||
"lvalue": "[target_temperature]",
|
||||
"rvalue": "[target_temperature_new] * 2"
|
||||
},
|
||||
{
|
||||
"lvalue": "[current_temperature]",
|
||||
"rvalue": "[current_temperature_new] * 2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"entities": {
|
||||
Platform.CLIMATE: {
|
||||
"thermostat": {
|
||||
"name": "Thermostat",
|
||||
"power": "power",
|
||||
"hvac_modes": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
},
|
||||
"preset_modes": {
|
||||
"none": {
|
||||
"eco": "off",
|
||||
"comfort_power_save": "off",
|
||||
"comfort_sleep": "off",
|
||||
"strong_wind": "off"
|
||||
},
|
||||
"eco": {"eco": "on"},
|
||||
"comfort": {"comfort_power_save": "on"},
|
||||
"sleep": {"comfort_sleep": "on"},
|
||||
"boost": {"strong_wind": "on"}
|
||||
},
|
||||
"swing_modes": {
|
||||
"off": {"wind_swing_lr": "off", "wind_swing_ud": "off"},
|
||||
"both": {"wind_swing_lr": "on", "wind_swing_ud": "on"},
|
||||
"horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"},
|
||||
"vertical": {"wind_swing_lr": "off", "wind_swing_ud": "on"},
|
||||
},
|
||||
"fan_modes": {
|
||||
"silent": {"wind_speed": 20},
|
||||
"low": {"wind_speed": 40},
|
||||
"medium": {"wind_speed": 60},
|
||||
"high": {"wind_speed": 80},
|
||||
"full": {"wind_speed": 100},
|
||||
"auto": {"wind_speed": 102}
|
||||
},
|
||||
"target_temperature": ["temperature", "small_temperature"],
|
||||
"current_temperature": "indoor_temperature",
|
||||
"aux_heat": "ptc",
|
||||
"min_temp": 17,
|
||||
"max_temp": 30,
|
||||
"temperature_unit": TEMP_CELSIUS,
|
||||
"precision": PRECISION_HALVES,
|
||||
}
|
||||
},
|
||||
Platform.SWITCH: {
|
||||
"dry": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"prevent_straight_wind": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": [1, 2]
|
||||
},
|
||||
"aux_heat": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"indoor_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"outdoor_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
"22012227": {
|
||||
"manufacturer": "TOSHIBA",
|
||||
"rationale": ["off", "on"],
|
||||
"queries": [],
|
||||
"centralized": ["power", "temperature", "small_temperature", "mode", "eco", "comfort_power_save",
|
||||
"comfort_sleep", "strong_wind", "wind_swing_lr", "wind_swing_ud", "wind_speed",
|
||||
"ptc", "dry"],
|
||||
"entities": {
|
||||
Platform.CLIMATE: {
|
||||
"thermostat": {
|
||||
"name": "Thermostat",
|
||||
"power": "power",
|
||||
"hvac_modes": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
},
|
||||
"preset_modes": {
|
||||
"none": {
|
||||
"eco": "off",
|
||||
"comfort_power_save": "off",
|
||||
"comfort_sleep": "off",
|
||||
"strong_wind": "off"
|
||||
},
|
||||
"eco": {"eco": "on"},
|
||||
"comfort": {"comfort_power_save": "on"},
|
||||
"sleep": {"comfort_sleep": "on"},
|
||||
"boost": {"strong_wind": "on"}
|
||||
},
|
||||
"swing_modes": {
|
||||
"off": {"wind_swing_lr": "off", "wind_swing_ud": "off"},
|
||||
"both": {"wind_swing_lr": "on", "wind_swing_ud": "on"},
|
||||
"horizontal": {"wind_swing_lr": "on", "wind_swing_ud": "off"},
|
||||
"vertical": {"wind_swing_lr": "off", "wind_swing_ud": "on"},
|
||||
},
|
||||
"fan_modes": {
|
||||
"silent": {"wind_speed": 20},
|
||||
"low": {"wind_speed": 40},
|
||||
"medium": {"wind_speed": 60},
|
||||
"high": {"wind_speed": 80},
|
||||
"full": {"wind_speed": 100},
|
||||
"auto": {"wind_speed": 102}
|
||||
},
|
||||
"target_temperature": "target_temperature_new",
|
||||
"current_temperature": "current_temperature_new",
|
||||
"aux_heat": "ptc",
|
||||
"min_temp": 17,
|
||||
"max_temp": 30,
|
||||
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||
"precision": PRECISION_HALVES,
|
||||
}
|
||||
},
|
||||
Platform.WATER_HEATER:{
|
||||
"water_heater": {
|
||||
"name": "Gas Water Heater",
|
||||
"power": "power",
|
||||
"operation_list": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
},
|
||||
"target_temperature": ["temperature", "small_temperature"],
|
||||
"current_temperature": "indoor_temperature",
|
||||
"min_temp": 17,
|
||||
"max_temp": 30,
|
||||
"temperature_unit": UnitOfTemperature.CELSIUS,
|
||||
"precision": PRECISION_HALVES,
|
||||
}
|
||||
},
|
||||
Platform.FAN: {
|
||||
"fan": {
|
||||
"power": "power",
|
||||
"preset_modes": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
},
|
||||
"oscillate": "wind_swing_lr",
|
||||
"speeds": list({"wind_speed": value + 1} for value in range(0, 100)),
|
||||
}
|
||||
},
|
||||
Platform.SWITCH: {
|
||||
"dry": {
|
||||
"name": "干燥",
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"prevent_straight_wind": {
|
||||
"name": "防直吹",
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": [1, 2]
|
||||
},
|
||||
"aux_heat": {
|
||||
"name": "电辅热",
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"indoor_temperature": {
|
||||
"name": "室内温度",
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"outdoor_temperature": {
|
||||
"name": "室外温度",
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
},
|
||||
Platform.BINARY_SENSOR: {
|
||||
"dust_full": {
|
||||
"icon": "mdi:air-filter",
|
||||
"name": "滤网尘满",
|
||||
"device_class": BinarySensorDeviceClass.PROBLEM
|
||||
},
|
||||
"move_detect": {}
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"preset_modes": {
|
||||
"options": {
|
||||
"none": {
|
||||
"eco": "off",
|
||||
"comfort_power_save": "off",
|
||||
"comfort_sleep": "off",
|
||||
"strong_wind": "off"
|
||||
},
|
||||
"eco": {"eco": "on"},
|
||||
"comfort": {"comfort_power_save": "on"},
|
||||
"sleep": {"comfort_sleep": "on"},
|
||||
"boost": {"strong_wind": "on"}
|
||||
}
|
||||
},
|
||||
"hvac_modes": {
|
||||
"options": {
|
||||
"off": {"power": "off"},
|
||||
"heat": {"power": "on", "mode": "heat"},
|
||||
"cool": {"power": "on", "mode": "cool"},
|
||||
"auto": {"power": "on", "mode": "auto"},
|
||||
"dry": {"power": "on", "mode": "dry"},
|
||||
"fan_only": {"power": "on", "mode": "fan"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user