- Updated device mapping configuration to support explicit device range specification
- Changed from simple [min_kelvin, max_kelvin] format to structured format:
{"kelvin_range": [min_kelvin, max_kelvin], "device_range": [min_device, max_device]}
- This allows devices with non-standard (non-1-100) color temp ranges to be properly supported
- Improved color temperature conversion logic in light entity:
- Added support for device-specific range mapping instead of hardcoded 1-100 range
- Enhanced configuration detection to handle both direct and nested formats
- Updated kelvin-to-device and device-to-kelvin conversion to use dynamic ranges
Removed the erroneous brightness value mapping (1-100 ↔ 0-255) for devices
configured with brightness range [0, 255]. The previous logic incorrectly
assumed these devices actually operated in a 1-100 range, causing inaccurate
brightness values.
- 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