使用 Kelvin 作为首选 color temperature 单位
变更摘要
2022 年 10 月,Home Assistant 将首选 color temperature 单位从 mired 迁移到了 kelvin。
现在时候到了,我们需要为相应的 attributes、constants 和 properties 添加 deprecation warnings:
- 弃用 state 和 capability attributes:
ATTR_COLOR_TEMP、ATTR_MIN_MIREDS和ATTR_MAX_MIREDS - 弃用
light.turn_onservice call 中的常量ATTR_KELVIN和ATTR_COLOR_TEMP - 弃用 properties:
LightEntity.color_temp、LightEntity.min_mireds和LightEntity.max_mireds - 弃用相应的 attributes:
LightEntity._attr_color_temp、LightEntity._attr_min_mired和LightEntity._attr_max_mired

