RGBW 灯光
rgbw 灯光平台根据 4 个 float 输出组件(每个通道一个)创建一个 RGBW 灯光。
# 示例配置条目light: - platform: rgbw name: "Livingroom Lights" red: output_component1 green: output_component2 blue: output_component3 white: output_component4通常最好校准/校正 LED 灯带产生的颜色,因为不同颜色的 感知强度通常会有所不同。这可以通过在单个输出通道上使用 max_power 来完成:
# 示例配置条目light: - platform: rgbw name: "Livingroom Lights" red: output_component1 green: output_component2 blue: output_component3 white: output_component4
# 示例输出条目output: - platform: ... id: output_component1 max_power: 80%NOTE
请记住 gamma_correct 默认启用(γ=2.8 ),你可能需要在校准时考虑它。例如,如果你命令灯光为 50% 亮度并希望它成为新的最大值:max_PWM_power = max_light_power^2.8 = 0.5^2.8 = 0.144,那么你将 max_power 设为 14.4%。
对于某些 LED 灯泡,不可能在同时开启白色 LED 的同时开启 RGB LED,或者在希望得到白光时将 RGB 通道设为最大会导致不希望的色相效果。对于这些情况,有一个
配置变量可防止 RGB LED 和白色 LED 同时开启:color_interlock。
将此选项设为 true 将使灯光拥有两种可用的颜色模式,RGB 和 WHITE。
当 RGB 颜色模式处于活动时,白色 LED 被关闭,当 WHITE 颜色模式处于活动时,
RGB LED 被关闭。可以在 Home Assistant 界面中切换这些模式,也可以使用
light control 动作 的 color_mode 选项。