Commit Graph

5 Commits

Author SHA1 Message Date
Cyborg2017
c879f911d1 feat: enhance color temperature control for light devices with flexible range
- 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
2026-01-30 13:58:21 +08:00
Cyborg2017
81b8a509bc fix: correct brightness mapping for 0-255 configured light devices
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.
2026-01-30 13:58:05 +08:00
sususweet
224d6b0bbc feat: fix device support for T0x13. 2025-10-14 20:37:39 +08:00
sususweet
341796a8d4 feat: fix device support for T0x13. 2025-10-14 20:36:27 +08:00
sususweet
187c46168c feat: add device support for T0x13. 2025-10-14 20:29:35 +08:00