mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2025-10-15 02:38:29 +00:00
feat: add cooker T0xB7
This commit is contained in:
117
custom_components/midea_auto_cloud/device_mapping/T0xB7.py
Normal file
117
custom_components/midea_auto_cloud/device_mapping/T0xB7.py
Normal file
@@ -0,0 +1,117 @@
|
||||
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, UnitOfTime
|
||||
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": [
|
||||
"left_power", "left_recipe_current_step_action", "left_recipe_id",
|
||||
"left_dry_fire_protection", "left_recipe_rest_time", "left_gear",
|
||||
"left_current_temperature", "lock", "left_status", "eq_recipe_action",
|
||||
"left_lock", "gas_leakage_code", "left_work_time", "left_recipe_current_step",
|
||||
"left_recipe_target_steps", "version", "left_recipe_target_time",
|
||||
"is_error", "left_cookmode", "light_lampblack_mode", "error_type"
|
||||
],
|
||||
"entities": {
|
||||
Platform.SWITCH: {
|
||||
"left_power": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"left_dry_fire_protection": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"left_lock": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"lock": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": ['0', '1'],
|
||||
},
|
||||
"light_lampblack_mode": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
"rationale": [0, 1],
|
||||
}
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"left_cookmode": {
|
||||
"options": {
|
||||
"default": {"left_cookmode": "default"},
|
||||
"order": {"left_cookmode": "order"},
|
||||
"keep_temperature": {"left_cookmode": "keep_temperature"},
|
||||
"local_recipe": {"left_cookmode": "local_recipe"},
|
||||
"cloud_recipe": {"left_cookmode": "cloud_recipe"},
|
||||
"order_keep_temperature": {"left_cookmode": "order_keep_temperature"},
|
||||
}
|
||||
},
|
||||
"left_gear": {
|
||||
"options": {
|
||||
"0": {"left_gear": 0},
|
||||
"1": {"left_gear": 1},
|
||||
"2": {"left_gear": 2},
|
||||
"3": {"left_gear": 3},
|
||||
"4": {"left_gear": 4},
|
||||
"5": {"left_gear": 5},
|
||||
"6": {"left_gear": 6},
|
||||
"7": {"left_gear": 7},
|
||||
"8": {"left_gear": 8},
|
||||
"9": {"left_gear": 9}
|
||||
}
|
||||
},
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"left_recipe_current_step_action": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"left_recipe_id": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"left_recipe_rest_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.SECONDS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"left_current_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"left_status": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"eq_recipe_action": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"gas_leakage_code": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"left_work_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.SECONDS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"left_recipe_current_step": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
},
|
||||
"left_recipe_target_steps": {
|
||||
"device_class": SensorDeviceClass.ENUM
|
||||
},
|
||||
"left_recipe_target_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.SECONDS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"error_type": {
|
||||
"device_class": SensorDeviceClass.ENUM,
|
||||
}
|
||||
},
|
||||
Platform.BINARY_SENSOR: {
|
||||
"is_error": {
|
||||
"device_class": BinarySensorDeviceClass.PROBLEM,
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -548,6 +548,20 @@
|
||||
},
|
||||
"swing_vertical": {
|
||||
"name": "Swing Vertical"
|
||||
},
|
||||
"left_cookmode": {
|
||||
"name": "Left Cook Mode",
|
||||
"options": {
|
||||
"default": "Default",
|
||||
"order": "Order",
|
||||
"keep_temperature": "Keep Temperature",
|
||||
"local_recipe": "Local Recipe",
|
||||
"cloud_recipe": "Cloud Recipe",
|
||||
"order_keep_temperature": "Order Keep Temperature"
|
||||
}
|
||||
},
|
||||
"left_gear": {
|
||||
"name": "Left Gear"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
@@ -1336,6 +1350,42 @@
|
||||
},
|
||||
"cur_fault_code": {
|
||||
"name": "Current Fault Code"
|
||||
},
|
||||
"left_recipe_current_step_action": {
|
||||
"name": "Left Recipe Current Step Action"
|
||||
},
|
||||
"left_recipe_id": {
|
||||
"name": "Left Recipe ID"
|
||||
},
|
||||
"left_recipe_rest_time": {
|
||||
"name": "Left Recipe Rest Time"
|
||||
},
|
||||
"left_current_temperature": {
|
||||
"name": "Left Current Temperature"
|
||||
},
|
||||
"left_status": {
|
||||
"name": "Left Status"
|
||||
},
|
||||
"eq_recipe_action": {
|
||||
"name": "Eq Recipe Action"
|
||||
},
|
||||
"gas_leakage_code": {
|
||||
"name": "Gas Leakage Code"
|
||||
},
|
||||
"left_work_time": {
|
||||
"name": "Left Work Time"
|
||||
},
|
||||
"left_recipe_current_step": {
|
||||
"name": "Left Recipe Current Step"
|
||||
},
|
||||
"left_recipe_target_steps": {
|
||||
"name": "Left Recipe Target Steps"
|
||||
},
|
||||
"left_recipe_target_time": {
|
||||
"name": "Left Recipe Target Time"
|
||||
},
|
||||
"error_type": {
|
||||
"name": "Error Type"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
@@ -2136,6 +2186,18 @@
|
||||
},
|
||||
"wash_mode": {
|
||||
"name": "Wash Mode"
|
||||
},
|
||||
"left_power": {
|
||||
"name": "Left Power"
|
||||
},
|
||||
"left_dry_fire_protection": {
|
||||
"name": "Left Dry Fire Protection"
|
||||
},
|
||||
"left_lock": {
|
||||
"name": "Left Lock"
|
||||
},
|
||||
"light_lampblack_mode": {
|
||||
"name": "Light Lampblack Mode"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -548,6 +548,20 @@
|
||||
},
|
||||
"swing_vertical": {
|
||||
"name": "垂直摆风"
|
||||
},
|
||||
"left_cookmode": {
|
||||
"name": "左侧烹饪模式",
|
||||
"options": {
|
||||
"default": "默认",
|
||||
"order": "预约",
|
||||
"keep_temperature": "保温",
|
||||
"local_recipe": "本地食谱",
|
||||
"cloud_recipe": "云食谱",
|
||||
"order_keep_temperature": "预约保温"
|
||||
}
|
||||
},
|
||||
"left_gear": {
|
||||
"name": "左侧档位"
|
||||
}
|
||||
},
|
||||
"sensor": {
|
||||
@@ -1339,6 +1353,42 @@
|
||||
},
|
||||
"cur_fault_code": {
|
||||
"name": "当前故障代码"
|
||||
},
|
||||
"left_recipe_current_step_action": {
|
||||
"name": "左侧食谱当前步骤动作"
|
||||
},
|
||||
"left_recipe_id": {
|
||||
"name": "左侧食谱ID"
|
||||
},
|
||||
"left_recipe_rest_time": {
|
||||
"name": "左侧食谱剩余时间"
|
||||
},
|
||||
"left_current_temperature": {
|
||||
"name": "左侧当前温度"
|
||||
},
|
||||
"left_status": {
|
||||
"name": "左侧状态"
|
||||
},
|
||||
"eq_recipe_action": {
|
||||
"name": "等量食谱动作"
|
||||
},
|
||||
"gas_leakage_code": {
|
||||
"name": "燃气泄漏代码"
|
||||
},
|
||||
"left_work_time": {
|
||||
"name": "左侧工作时间"
|
||||
},
|
||||
"left_recipe_current_step": {
|
||||
"name": "左侧食谱当前步骤"
|
||||
},
|
||||
"left_recipe_target_steps": {
|
||||
"name": "左侧食谱目标步骤"
|
||||
},
|
||||
"left_recipe_target_time": {
|
||||
"name": "左侧食谱目标时间"
|
||||
},
|
||||
"error_type": {
|
||||
"name": "错误类型"
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
@@ -2139,6 +2189,18 @@
|
||||
},
|
||||
"wash_mode": {
|
||||
"name": "洗涤模式"
|
||||
},
|
||||
"left_power": {
|
||||
"name": "左侧电源"
|
||||
},
|
||||
"left_dry_fire_protection": {
|
||||
"name": "左侧干烧保护"
|
||||
},
|
||||
"left_lock": {
|
||||
"name": "左侧锁定"
|
||||
},
|
||||
"light_lampblack_mode": {
|
||||
"name": "灯光油烟模式"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user