[light] Add light.effect.next / light.effect.previous actions (#16491)

This commit is contained in:
Jesse Hills
2026-05-22 13:42:50 +12:00
committed by GitHub
parent 1d3eea098e
commit 0b2eb6481f
6 changed files with 283 additions and 5 deletions

View File

@@ -103,6 +103,16 @@ esphome:
- light.turn_on:
id: test_monochromatic_light
effect: !lambda 'return iteration > 1 ? "Strobe" : "none";'
# Cycle through configured effects (skip "None")
- light.effect.next: test_monochromatic_light
- light.effect.previous: test_monochromatic_light
# Cycle through effects including "None"
- light.effect.next:
id: test_monochromatic_light
include_none: true
- light.effect.previous:
id: test_monochromatic_light
include_none: true
- light.dim_relative:
id: test_monochromatic_light
relative_brightness: 5%