mirror of
https://github.com/sususweet/midea-meiju-codec.git
synced 2026-02-27 22:26:36 +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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user