ESPHome’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/esphome/esphome.io/llms.txt
Use this file to discover all available pages before exploring further.
light domain transforms GPIO outputs, PWM channels, and addressable LED drivers into full-featured Home Assistant light entities. A single configuration block covers everything from a simple on/off LED to a 300-pixel RGBWW NeoPixel strip with animated effects, color temperature control, gamma correction, and persistent state across reboots.
Base Light Configuration
All light platforms share these configuration variables.Manually specify the ID for code generation. At least one of
id and name must be specified.The name of the light in Home Assistant. Set to
None to inherit the device’s friendly_name.Manually override the MDI icon shown in the frontend.
How the light restores state on boot:
ALWAYS_OFF(default) — always start off.ALWAYS_ON— always start on.RESTORE_DEFAULT_OFF— restore last state, default to off.RESTORE_DEFAULT_ON— restore last state, default to on.RESTORE_AND_OFF/RESTORE_AND_ON— restore colors but force on/off state.RESTORE_INVERTED_DEFAULT_OFF/RESTORE_INVERTED_DEFAULT_ON— invert restored state.
Gamma correction factor applied to all channels. Defaults to
2.8. Set to 1.0 to disable.Default transition time when no explicit length is specified. Defaults to
1s.Transition length used during flash calls. Defaults to
0s.A list of light effects to make available. Each entry in this list appears as an effect option in Home Assistant.
Per-channel maximum brightness correction for addressable lights, e.g.
[100%, 50%, 100%].ID of a
power_supply component to automatically switch on when the light turns on.If
true, the entity is hidden in Home Assistant until manually enabled. Defaults to false.Light Automations
light.turn_on Action
light.turn_off Action
light.toggle Action
light.dim_relative Action
Increase or decrease brightness by a relative percentage — great for button hold-to-dim.
light.addressable_set Action
Set individual LEDs on an addressable strip.
Triggers
light.is_on / light.is_off Condition
Light Effects
ESPHome has many built-in effects. List the ones you want in theeffects: key; each appears as a selectable effect in Home Assistant.
Pulse
Smoothly fades in and out.Random
Transitions to a randomly chosen color at each interval.Strobe
Cycles through a list of colors with defined durations.Flicker
Simulates a candle flame by randomly varying brightness and color.Addressable Effects (NeoPixel / addressable strips only)
WLED Effect
Receive realtime UDP control from WLED-compatible software (Prismatik, LedFx, Hyperion).E1.31 Effect
Receive DMX-over-UDP from JINX, Hyperion.NG, and similar lighting control software.Popular Light Platforms
Binary Light
Simple on/off control using a binary output. The most basic light type.
Monochromatic Light
Single-channel brightness control using a float (PWM) output.
RGB Light
Three PWM outputs for red, green, and blue channels. Full color control.
RGBW / RGBWW Light
RGB plus separate white (and warm white) channels. Supports color temperature control.
NeoPixelBus
Addressable LED strips (WS2812, SK6812, APA102, etc.) via the NeoPixelBus library.
FastLED
Alternative addressable LED driver using the FastLED library. Supports many strip types.
Partition
Split one addressable strip into independently controlled segments.
Color Temperature
Cold/warm white dual-channel light with Home Assistant color temperature control.