From 3cacc0e77f565cf7b05a6e6f2ff6e4c6bf660002 Mon Sep 17 00:00:00 2001 From: Brandon Harvey <8107750+bharvey88@users.noreply.github.com> Date: Mon, 25 May 2026 19:26:55 -0500 Subject: [PATCH 1/2] [light] Add scannable effects index with CSS-animated previews --- src/content/docs/components/light/index.mdx | 300 ++++++++++++++++++++ 1 file changed, 300 insertions(+) diff --git a/src/content/docs/components/light/index.mdx b/src/content/docs/components/light/index.mdx index 3b4eab0878..d30c266ff9 100644 --- a/src/content/docs/components/light/index.mdx +++ b/src/content/docs/components/light/index.mdx @@ -498,6 +498,306 @@ light: > After setting a light effect, it is possible to reset the in-use effect back to a static light by setting the > `effect` to `none` when it is being called through Home Assistant or directly on the device. + + +### Basic animations + +These effects work on any light platform. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PreviewEffectDescriptionParameters
PulseSmooth brightness pulsename, transition_length, update_interval, min_brightness, max_brightness
RandomRandom colors at fixed intervalsname, transition_length, update_interval
StrobeCycle through a list of colors with set durationsname, colors
FlickerCandle-like brightness variationname, alpha, intensity
LambdaRun custom C++ on each updatename, update_interval, lambda
+ +### Strip animations + +These effects require an addressable light (LED strip). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PreviewEffectDescriptionParameters
Addressable RainbowHue sweeps the length of the stripname, speed, width
Addressable Color WipeNew colors shift in at the start of the stripname, colors, add_led_interval, reverse
Addressable ScanSingle dot slides back and forth across the stripname, move_interval, scan_width
Addressable TwinkleRandom pixels brighten and fadename, twinkle_probability, progress_interval
Addressable Random TwinkleTwinkle, but each pixel gets a random colorname, twinkle_probability, progress_interval
Addressable FireworksSparks burst from random pixelsname, update_interval, spark_probability, use_random_color, fade_out_rate
Addressable FlickerPer-pixel candle flickername, update_interval, intensity
Addressable LambdaRun custom C++ per LEDname, update_interval, lambda
+ +### External control + +These effects receive frames from an external source instead of generating animation locally. + + + + + + + + + + + + + + + + + + + + + + + + + +
EffectDescriptionParameters
AutomationRun ESPHome automation actions on a loopname, sequence
E1.31Receive sACN / E1.31 frames over the networkuniverse, channels
AdalightReceive Adalight protocol over UARTuart_id
WLEDReceive WLED UDP sync protocolport, blank_on_start, sync_group_mask
+ ### Pulse Effect This effect makes a pulsating light. The period can be defined by `update_interval`, the transition length with From 2404c0d482d3fd8d12a570d3d16e8962c06c37f4 Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Tue, 26 May 2026 21:50:54 +1200 Subject: [PATCH 2/2] [light] Extract effect previews into reusable component Move the inline diff --git a/src/content/docs/components/light/index.mdx b/src/content/docs/components/light/index.mdx index d30c266ff9..6e5f70b0a6 100644 --- a/src/content/docs/components/light/index.mdx +++ b/src/content/docs/components/light/index.mdx @@ -8,6 +8,7 @@ sidebar: import APIClass from '@components/APIClass.astro'; import APIStruct from '@components/APIStruct.astro'; import APIRef from '@components/APIRef.astro'; +import LightEffectPreview from '@components/LightEffectPreview.astro'; In ESPHome, `light` components allow you to create lights usable from Home Assistant's frontend and have many features such as colors, transitions and even effects. @@ -498,305 +499,43 @@ light: > After setting a light effect, it is possible to reset the in-use effect back to a static light by setting the > `effect` to `none` when it is being called through Home Assistant or directly on the device. - - -### Basic animations +### Basic Animations These effects work on any light platform. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PreviewEffectDescriptionParameters
PulseSmooth brightness pulsename, transition_length, update_interval, min_brightness, max_brightness
RandomRandom colors at fixed intervalsname, transition_length, update_interval
StrobeCycle through a list of colors with set durationsname, colors
FlickerCandle-like brightness variationname, alpha, intensity
LambdaRun custom C++ on each updatename, update_interval, lambda
- -### Strip animations +| Preview | Effect | Description | Parameters | +| --- | --- | --- | --- | +| | [Pulse](#pulse-effect) | Smooth brightness pulse | `name`, `transition_length`, `update_interval`, `min_brightness`, `max_brightness` | +| | [Random](#random-effect) | Random colors at fixed intervals | `name`, `transition_length`, `update_interval` | +| | [Strobe](#strobe-effect) | Cycle through a list of colors with set durations | `name`, `colors` | +| | [Flicker](#flicker-effect) | Candle-like brightness variation | `name`, `alpha`, `intensity` | +| | [Lambda](#lambda-effect) | Run custom C++ on each update | `name`, `update_interval`, `lambda` | + +### Strip Animations These effects require an addressable light (LED strip). - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PreviewEffectDescriptionParameters
Addressable RainbowHue sweeps the length of the stripname, speed, width
Addressable Color WipeNew colors shift in at the start of the stripname, colors, add_led_interval, reverse
Addressable ScanSingle dot slides back and forth across the stripname, move_interval, scan_width
Addressable TwinkleRandom pixels brighten and fadename, twinkle_probability, progress_interval
Addressable Random TwinkleTwinkle, but each pixel gets a random colorname, twinkle_probability, progress_interval
Addressable FireworksSparks burst from random pixelsname, update_interval, spark_probability, use_random_color, fade_out_rate
Addressable FlickerPer-pixel candle flickername, update_interval, intensity
Addressable LambdaRun custom C++ per LEDname, update_interval, lambda
- -### External control +| Preview | Effect | Description | Parameters | +| --- | --- | --- | --- | +| | [Addressable Rainbow](#addressable-rainbow-effect) | Hue sweeps the length of the strip | `name`, `speed`, `width` | +| | [Addressable Color Wipe](#addressable-color-wipe-effect) | New colors shift in at the start of the strip | `name`, `colors`, `add_led_interval`, `reverse` | +| | [Addressable Scan](#addressable-scan-effect) | Single dot slides back and forth across the strip | `name`, `move_interval`, `scan_width` | +| | [Addressable Twinkle](#addressable-twinkle-effect) | Random pixels brighten and fade | `name`, `twinkle_probability`, `progress_interval` | +| | [Addressable Random Twinkle](#addressable-random-twinkle-effect) | Twinkle, but each pixel gets a random color | `name`, `twinkle_probability`, `progress_interval` | +| | [Addressable Fireworks](#addressable-fireworks-effect) | Sparks burst from random pixels | `name`, `update_interval`, `spark_probability`, `use_random_color`, `fade_out_rate` | +| | [Addressable Flicker](#addressable-flicker-effect) | Per-pixel candle flicker | `name`, `update_interval`, `intensity` | +| | [Addressable Lambda](#addressable-lambda-effect) | Run custom C++ per LED | `name`, `update_interval`, `lambda` | + +### External Control These effects receive frames from an external source instead of generating animation locally. - - - - - - - - - - - - - - - - - - - - - - - - -
EffectDescriptionParameters
AutomationRun ESPHome automation actions on a loopname, sequence
E1.31Receive sACN / E1.31 frames over the networkuniverse, channels
AdalightReceive Adalight protocol over UARTuart_id
WLEDReceive WLED UDP sync protocolport, blank_on_start, sync_group_mask
+| Effect | Description | Parameters | +| --- | --- | --- | +| [Automation](#automation-light-effect) | Run ESPHome automation actions on a loop | `name`, `sequence` | +| [E1.31](#e131-effect) | Receive sACN / E1.31 frames over the network | `universe`, `channels` | +| [Adalight](#adalight-effect) | Receive Adalight protocol over UART | `uart_id` | +| [WLED](#wled-effect) | Receive WLED UDP sync protocol | `port`, `blank_on_start`, `sync_group_mask` | ### Pulse Effect