Getting Started with Home Assistant LED Control: WLED, MQTT, and Automations
You’ve built a WLED controller, soldered your strip, and tuned your segments in the web UI. The real magic starts when your LEDs join your smart home — dimming at sunset, flashing red when the door opens while you’re away, following your circadian rhythm. Home Assistant turns WLED from a standalone controller into a fully-integrated smart lighting system.

Why Home Assistant + WLED?
Home Assistant is the leading open-source smart home platform — no cloud dependency, everything runs locally. WLED is the most popular open-source LED firmware, and its developers have worked closely with the Home Assistant community to make integration seamless.
The combination gives you:
- Voice control — Alexa, Google Home, and HomeKit work out of the box
- Schedules — trigger presets at sunset, sunrise, or any time
- Automations — motion-activated lights, door alerts, wake-up routines
- Scenes — save and recall lighting moods across multiple WLED controllers
- Zero cloud dependency — everything runs on your LAN, internet not required
Every WLED feature — segments, presets, brightness, color, effects, speed, and intensity — is exposed as native Home Assistant entities. No bridge, no HACS, no YAML fiddling.
Installing the WLED Integration
The native WLED integration ships with Home Assistant 2023.5+.
- Go to Settings → Devices & Services → Add Integration
- Search for WLED — it auto-discovers WLED instances on your network via mDNS
- Click to add — the integration connects automatically
No manual configuration needed. The integration reads everything over HTTP: IP, port, LED count, segment definitions. Each WLED segment becomes a separate light entity:
light.wled_living_room
light.wled_living_room_segment_1 # TV backlight
light.wled_living_room_segment_2 # shelf accentMultiple WLED controllers each appear as their own device with per-segment lights and a device-level switch to power the whole controller.
Setting Up MQTT (Optional but Powerful)
The native HTTP integration polls for state changes. Adding MQTT upgrades to instant push updates — when a physical button press happens on the controller, Home Assistant sees it immediately.
One-click Mosquitto setup: install the Mosquitto broker add-on (Settings → Add-ons → Add-on Store), start it, then configure the MQTT integration in Devices & Services.
Enable MQTT in WLED: Config → Sync Interfaces → enable MQTT, enter your broker IP and port (1883), and set a unique Device Topic (e.g., wled/livingroom).
Every state change now publishes in real time. The real win: other devices control WLED without Home Assistant — an ESPHome motion sensor can publish to wled/livingroom/seg/0/col and change colors directly. MQTT also exposes WLED presets as selectable entities like select.wled_living_room_preset.
Useful Automations
Five automations that turn LEDs from decorative to genuinely useful.
Dusk-on. Trigger WLED at sunset using the sun.sun entity — no time scheduling needed:
alias: "LEDs On at Sunset"
trigger:
platform: sun
event: sunset
offset: "-00:15:00"
action:
- service: light.turn_on
target:
entity_id: light.wled_living_room
data:
brightness_pct: 40
color_temp: 400
mode: singleMotion-activated. Brighten LEDs to 80% for 5 minutes when motion fires:
alias: "Hallway LEDs on Motion"
trigger:
platform: state
entity_id: binary_sensor.hallway_motion
to: "on"
action:
- service: light.turn_on
target:
entity_id: light.wled_hallway
data:
brightness_pct: 80
rgb_color: [255, 220, 180]
- delay: "00:05:00"
- service: light.turn_off
target:
entity_id: light.wled_hallwayDoor alert. Flash LEDs red when the front door opens while armed away:
alias: "Door Alert LEDs"
trigger:
platform: state
entity_id: binary_sensor.front_door
to: "on"
condition:
condition: state
entity_id: alarm_control_panel.home_alarm
state: armed_away
action:
- service: light.turn_on
target:
entity_id: light.wled_living_room
data:
rgb_color: [255, 0, 0]
effect: "Blink"
brightness_pct: 100Wake-up light. Gradually brighten over 15 minutes — gentler than any phone alarm:
alias: "Wake Up Light"
trigger:
platform: time
at: "06:30:00"
action:
- service: light.turn_on
target:
entity_id: light.wled_bedroom
data:
brightness_pct: 1
kelvin: 2700
- service: light.turn_on
target:
entity_id: light.wled_bedroom
data:
brightness_pct: 80
transition: 900
mode: singleTV time. Dim LEDs to 10% when media starts playing:
alias: "TV Time Dimming"
trigger:
platform: state
entity_id: media_player.living_room_tv
to: "playing"
action:
- service: light.turn_on
target:
entity_id: light.wled_living_room
data:
brightness_pct: 10
rgb_color: [255, 100, 50]Creating Scenes
WLED presets are automatically exposed in Home Assistant as scene-like entities. Save a preset in the WLED UI and it appears in Home Assistant immediately.
- Movie Night — warm white at 10%, backlight behind the TV
- Party — full brightness, color cycle, speed 200
- Reading — warm white (2700K) at 50%
Trigger them from dashboards, NFC tags by your door, or include them in a Good Night routine that turns off lights, locks doors, and arms the alarm in one command.
Voice Control
Home Assistant exposes WLED to Alexa, Google Home, and Apple HomeKit through its cloud bridges or local integrations.
- “Alexa, set living room LEDs to blue”
- “Hey Google, dim the kitchen strip to 20%”
No extra WLED configuration needed. Expose individual segments as separate lights or the whole controller as one. For fully local voice control, use the Assist pipeline with an ESP32-S3 voice satellite — no cloud involved.
Astronomical Schedules
The sun entity goes beyond simple on/off at sunset. Use sun.sun attributes to trigger different presets based on the time of night:
- Civil twilight (sun 6° below horizon) — warm white at 40%
- Nighttime (sun 12°+ below) — dim red at 10% for night vision
- Astronomical dawn — transition to morning colors before sunrise
Adaptive Lighting adjusts color temperature throughout the day — cool 5000K at noon, warm 2200K at midnight. Enable it for your WLED entities and they track the sun’s natural curve automatically.
For variety, add a daily randomization script that picks a different color preset each evening. Your LEDs never look the same two nights in a row — a small touch that keeps permanent installations feeling fresh.