- add automatic position adjustment when `db_position` is set to 0
- enhance synchronization updates between control status and operational status
- improve `refresh_status` query logic to adhere to current position setting
1. `set_attribute()` method:
- add automatic synchronization of `db_location_selection` upon position changes
- maintain backward compatibility for direct updates to `db_location_selection`
2. `set_attributes()` method:
- add automatic synchronization of `db_location_selection` upon position changes
- maintain backward compatibility for direct updates to `db_location_selection`
3. `refresh_status()` method:
- update query parameter generation logic to adhere to `db_position` rules
- add automatic update of `db_location_selection` during status refresh
4. `_parse_cloud_message()` method:
- add logic to maintain consistency between `db_control_status` and operational status
- 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.
* 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>