* fix: correct voltage device class to battery for T0xBC
* fix: support of wind_pressure sensor for T0xB6(730007H8)
* also update translation_key
* fix: add PM2.5 threshold settings support for T0xFC(571Z3081)
* fix: Use correct rationale values for T0xD9 child_lock switch
* fix: Correct return type from string to number for T0xD9
---------
Co-authored-by: Yingqi Tang <tyq9702@sina.com>
- Add command field support to MideaNumberEntity and MideaSelectEntity
- Command templates allow defining fixed parameters in configuration
- Options/values are merged with command template before sending to device
- Backward compatible - existing configurations continue to work
Examples in device_mapping:
1. For NUMBER platform - brightness control with protocol template:
```yaml
Platform.NUMBER: {
"lightness": {
"min": 10,
"max": 100,
"step": 5,
"command": {
"electronic_control_version": 2,
"type": "b6",
"b6_action": "setting",
"setting": "light",
"lightness": "{value}" # {value} placeholder for actual number value
}
}
}
2.For SELECT platform - gesture selection with protocol template:
```yaml
Platform.SELECT: {
"gesture": {
"options": {
"off": {"gesture": "off"},
"on": {"gesture": "on"}
},
"command": { # Protocol template for gesture control
"electronic_control_version": 2,
"type": "b6",
"b6_action": "setting",
"setting": "gesture"
# {gesture} value from options will be merged automatically
}
}
}
* Device type: T0xAC, Sn8: 23096633, model: KFR-75T2/B3N8-XF(1)Ⅲ.
- Remove non-existent swing function
- Add standalone power switch
- Correct aux heat key (ptc)
- Add energy sensor with kWh conversion
- Add support for intake_wind / exhaust_wind
Co-authored-by: Dali Yang <cnyangdali@outlook.com>
* 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
Changes:
1. Fix speed selector "off" state:
- `percentage` property returns 0 when fan is off
- `async_set_percentage()` calls `async_turn_off()` for 0%
- `async_turn_on()` handles percentage=0 as turn off
2. Add auto-power on:
- `async_set_percentage()` powers on fan if off when selecting speed
- `async_set_preset_mode()` powers on fan if off when switching modes
3. Enhance user experience:
- 0% in speed slider → Turns fan off
- Any speed selection when off → Auto powers on + sets speed
- Mode switch when off → Auto powers on + sets mode
- Works with range-based speed configs
- Each preset mode (e.g normal/sleep/baby) now supports independent speed settings
- Automatically sets fixed speed when switching to single-speed modes
- Maintains backward compatibility with existing configuration format
- Dynamic switching of speed configuration based on selected preset mode
The implementation allows for more intuitive control where different
operating modes can have different speed adjustment capabilities.