- 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
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.
* Note: Ensures the shared control status (`db_control_status`) reflects the operational state of the currently active silo.
- If the selected silo is not running (`db_running_status`), the control status is set to 'pause'.
- This synchronization allows multiple silos to safely share a single control switch during switching operations.
* Note: `power` is the washing machine's power switch,
`db_running_status` only displays the running status of the current drum,
`db_control_status` is the switch to start or pause the current drum.