Light 分区
partition 灯光平台允许你将多个可寻址灯光段
(如 Fastled 或 Neopixelbus)和/或单独灯光(如 Rgb)组合成单个可寻址灯光。
此平台还允许将一个可寻址灯光分割为多个段,以便
可以单独控制各段。
分割单个 LED 灯带
Section titled “分割单个 LED 灯带”如果你想分割灯带,可能会遇到一些奇怪的行为,比如原始灯光实体(例如 fastled_clockless )
可能与 partition 冲突。为了更好地控制灯带的哪些段将重叠,
请将原始 light 标记为 internal: true。
# 示例配置条目light: - platform: partition name: "Partition Light 1" segments: # 使用 ID 为 light1 的灯光中的前 10 个 LED - id: light1 from: 0 to: 9
- platform: partition name: "Partition Light 2" segments: # 使用 ID 为 light1 的灯光中的 LED 11-20 - id: light1 from: 10 to: 19
# 灯光段源示例 - platform: fastled_clockless id: light1 # 你可能希望(但不是必须)使用此设置 internal: true # 其他设置将多个 LED 灯光合并为一个
Section titled “将多个 LED 灯光合并为一个”# 示例配置条目light: - platform: partition name: "Partition Light" segments: # 使用 ID 为 light1 的灯光中的前 10 个 LED - id: light1 from: 0 to: 9 # 使用 ID 为 light2 的灯光中的前 10 个 LED # 它们成为合并分区中的 LED 11-20 - id: light2 from: 0 to: 9 # 使用 light3 作为分区中的第 21 个灯光 - single_light_id: light3
# 灯光段源示例 - platform: fastled_clockless id: light1 # 你可能希望(但不是必须)使用此设置 internal: true # 其他设置
# 灯光段源示例 - platform: fastled_clockless id: light2 # 你可能希望(但不是必须)使用此设置 internal: true # 其他设置
# 不可寻址灯光源示例 - platform: rgb id: light3 # 你可能希望(但不是必须)使用此设置 internal: true # 其他设置