mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2026-02-11 06:13:49 +00:00
feat: add device mapping for T0x26(M0100040)
* Device type: T0x26, Sn8: M0100040, model: MY-S6X28-Y9W/Y9AW. - Optimize wind direction selector with unified angle control (60°-120°) - Add automatic swing mode for dynamic air distribution - Implement human-sensing night light switch with occupancy detection - Introduce dedicated temperature selectors for heating and bath modes (30-42°C) - Add lighting brightness controller with percentage-based adjustment (10-100%) - Update and improve Chinese translation strings for better localization
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from homeassistant.const import Platform, UnitOfTemperature, PRECISION_HALVES, UnitOfTime
|
||||
from homeassistant.const import Platform, UnitOfTemperature, PERCENTAGE, PRECISION_HALVES, UnitOfTime
|
||||
from homeassistant.components.sensor import SensorStateClass, SensorDeviceClass
|
||||
from homeassistant.components.binary_sensor import BinarySensorDeviceClass
|
||||
from homeassistant.components.switch import SwitchDeviceClass
|
||||
@@ -141,5 +141,91 @@ DEVICE_MAPPING = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"M0100040": {
|
||||
"rationale": ["off", "on"],
|
||||
"queries": [{}],
|
||||
"centralized": [],
|
||||
"entities": {
|
||||
Platform.NUMBER: {
|
||||
"bath_temperature": {
|
||||
"min": 30,
|
||||
"max": 42,
|
||||
"step": 1,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS
|
||||
},
|
||||
"heating_temperature": {
|
||||
"min": 30,
|
||||
"max": 42,
|
||||
"step": 1,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS
|
||||
},
|
||||
"main_light_brightness": {
|
||||
"min": 10,
|
||||
"max": 100,
|
||||
"step": 1,
|
||||
"unit_of_measurement": PERCENTAGE
|
||||
}
|
||||
},
|
||||
Platform.SWITCH: {
|
||||
"radar_induction_enable": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
},
|
||||
"wifi_led_enable": {
|
||||
"device_class": SwitchDeviceClass.SWITCH,
|
||||
}
|
||||
},
|
||||
Platform.SELECT: {
|
||||
"wind_direction": {
|
||||
"options": {
|
||||
"60": {"heating_direction": "60", "bath_direction": "60", "blowing_direction": "60", "drying_direction": "60"},
|
||||
"70": {"heating_direction": "70", "bath_direction": "70", "blowing_direction": "70", "drying_direction": "70"},
|
||||
"80": {"heating_direction": "80", "bath_direction": "80", "blowing_direction": "80", "drying_direction": "80"},
|
||||
"90": {"heating_direction": "90", "bath_direction": "90", "blowing_direction": "90", "drying_direction": "90"},
|
||||
"100": {"heating_direction": "100", "bath_direction": "100", "blowing_direction": "100", "drying_direction": "100"},
|
||||
"110": {"heating_direction": "110", "bath_direction": "110", "blowing_direction": "110", "drying_direction": "110"},
|
||||
"120": {"heating_direction": "120", "bath_direction": "120", "blowing_direction": "120", "drying_direction": "120"},
|
||||
"swing": {"heating_direction": "253", "bath_direction": "253", "blowing_direction": "253", "drying_direction": "253"}
|
||||
}
|
||||
},
|
||||
"light_mode": {
|
||||
"options": {
|
||||
"close_all": {"light_mode": "close_all"},
|
||||
"night_light": {"light_mode": "night_light"},
|
||||
"main_light": {"light_mode": "main_light"}
|
||||
}
|
||||
},
|
||||
"mode": {
|
||||
"options": {
|
||||
"close_all": {"mode": "close_all"},
|
||||
"heating": {"mode": "heating"},
|
||||
"bath": {"mode": "bath"},
|
||||
"blowing": {"mode": "blowing"},
|
||||
"ventilation": {"mode": "ventilation"},
|
||||
"drying": {"mode": "drying"}
|
||||
}
|
||||
},
|
||||
},
|
||||
Platform.SENSOR: {
|
||||
"night_light_brightness": {
|
||||
"unit_of_measurement": PERCENTAGE,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"main_light_brightness": {
|
||||
"unit_of_measurement": PERCENTAGE,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"current_temperature": {
|
||||
"device_class": SensorDeviceClass.TEMPERATURE,
|
||||
"unit_of_measurement": UnitOfTemperature.CELSIUS,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
},
|
||||
"delay_time": {
|
||||
"device_class": SensorDeviceClass.DURATION,
|
||||
"unit_of_measurement": UnitOfTime.MINUTES,
|
||||
"state_class": SensorStateClass.MEASUREMENT
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -684,7 +684,13 @@
|
||||
"fast": "速净模式",
|
||||
"service": "服务",
|
||||
"sleep": "睡眠模式",
|
||||
"normal_continus": "正常连续"
|
||||
"normal_continus": "正常连续",
|
||||
"close_all": "关闭",
|
||||
"heating": "取暖",
|
||||
"bath": "安心沐浴",
|
||||
"blowing": "吹风",
|
||||
"ventilation": "换气",
|
||||
"drying": "干燥"
|
||||
}
|
||||
},
|
||||
"mode_state": {
|
||||
@@ -978,7 +984,12 @@
|
||||
"name": "加热方向"
|
||||
},
|
||||
"light_mode": {
|
||||
"name": "灯光模式"
|
||||
"name": "灯光模式",
|
||||
"state": {
|
||||
"close_all": "关闭",
|
||||
"night_light": "夜灯",
|
||||
"main_light": "照明"
|
||||
}
|
||||
},
|
||||
"bath_direction": {
|
||||
"name": "浴室方向"
|
||||
@@ -986,6 +997,19 @@
|
||||
"drying_direction": {
|
||||
"name": "烘干方向"
|
||||
},
|
||||
"wind_direction": {
|
||||
"name": "吹风方向",
|
||||
"state": {
|
||||
"60": "60°",
|
||||
"70": "70°",
|
||||
"80": "80°",
|
||||
"90": "90°",
|
||||
"100": "100°",
|
||||
"110": "110°",
|
||||
"120": "120°",
|
||||
"swing": "自动摆风"
|
||||
}
|
||||
},
|
||||
"air_set_hour": {
|
||||
"name": "烘干存储设置时间"
|
||||
},
|
||||
@@ -2030,6 +2054,15 @@
|
||||
}
|
||||
},
|
||||
"number": {
|
||||
"bath_temperature": {
|
||||
"name": "沐浴温度"
|
||||
},
|
||||
"heating_temperature": {
|
||||
"name": "取暖温度"
|
||||
},
|
||||
"main_light_brightness": {
|
||||
"name": "照明亮度"
|
||||
},
|
||||
"light_brightness": {
|
||||
"name": "照明亮度"
|
||||
},
|
||||
@@ -2130,6 +2163,9 @@
|
||||
}
|
||||
},
|
||||
"switch": {
|
||||
"radar_induction_enable": {
|
||||
"name": "人感夜灯"
|
||||
},
|
||||
"auto_power_off": {
|
||||
"name": "待机超时自动关机"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user