WLED Sleep Timer and Wake-Up Light: Fade Off at Night, Brighten in the Morning
Use WLED's Nightlight timer to fade lights off after 30 minutes (up to 255), and set up a wake-up light that brightens in the morning.
Written by Jamie Conde, who builds WLED Max at MeowScript. WLED Max is an independent app and is not affiliated with or endorsed by the official WLED project.
WLED already has a sleep timer. It’s just called Nightlight, which is why people miss it.
Start it and the light fades (or switches) to off over a set number of minutes, anywhere from 1 to 255. That’s 4 hours 15 minutes at the top end. The countdown runs on the light itself, so it doesn’t care if your phone dies or leaves the house. Everything in the first half of this page uses only the WLED web interface.
What Nightlight actually does
When you start it, WLED remembers the current brightness and moves toward a target brightness over the time you picked. Four modes:
| Mode | What happens |
|---|---|
| Instant | Stays as is, then switches to the target brightness when time is up |
| Fade | Brightness fades smoothly to the target over the whole duration |
| Color fade | Fades brightness and also blends the primary color toward the secondary color |
| Sunrise | Runs WLED’s Sunrise effect, capped at 60 minutes. Started with the light off it is a sunrise. Started with the light on it plays a sunset instead |
The target is usually 0, meaning off. Set it to 10 or so and the light settles into a soft glow and stays there.
Setting it up in the web UI
- Open the light’s IP address in a browser, for example
http://192.168.1.50. - Go to Config›LED & Hardware (LED Preferences on 0.14 and 0.15) and scroll to the nightlight section. Set the default duration (30 minutes is a good start), the mode (Fade looks the most natural) and the target brightness (0 for off). Save.
- On the main page, tap the Timer button (the moon icon). The nightlight starts with those defaults.
- Tap the moon again to cancel.
In the web UI this block is headed Timed light (on WLED 16 the page is called LED & Hardware).
If you script your lights or use home automation, the JSON API does the same thing:
POST http://<light-ip>/json/state
{"nl": {"on": true, "dur": 30, "mode": 1, "tbri": 0}}
dur is minutes (1 to 255). mode is 0 Instant, 1 Fade, 2 Color fade, 3 Sunrise, and tbri is the target brightness.
Sunrise alarm (wake-up light) without any app
WLED can’t start a nightlight at a set time by itself. A timer plus a preset gets you most of the way:
- Make a preset that uses the Sunrise effect (effect ID 104). Its first slider, “Time [min]”, is the length of the sunrise in minutes, 1 to 60. The cleanest way to set an exact value is the preset’s API command field, for example
{"on": true, "bri": 255, "seg": [{"fx": 104, "sx": 20}]}for a 20 minute sunrise. - In Config > Time & Macros, make sure NTP is on and your time zone is right.
- Add a timer that runs that preset at 6:40 on weekdays.
Why not put "nl" with mode 3 in the preset instead? Because the preset also turns the light on, and WLED plays a sunset when the light is already on. The Sunrise effect avoids that.
It works fine, as long as you don’t mind editing a bit of preset JSON.
Schedule & Timer in the app
In WLED Max, open a light on the Control tab and tap Schedule & Timer. The button itself shows what happens next: the next scheduled event (“On at 6:00 PM”), the countdown of a running sleep timer, or “No schedule set”.
Two tabs sit under the page title. Timer, on the left and open by default, turns the light off once after a countdown. Schedule turns the light on at one time and off at another, repeating on the days you choose, and it lives on the light. You can use both at the same time. The app remembers which tab you used last, and while a sleep timer is running the page always opens on Timer so the countdown is right in front of you.
Sleep Timer
The Timer tab is a single card: Duration, Mode and the Start Timer button.
- Under Duration, pick 15m, 30m, 1h, 2h or 4h, or tap Custom for a slider from 1 minute to 4 hours 15 minutes (255 minutes, the firmware limit). The line below the buttons confirms your pick, for example “Timer: 30m”.
- Under Mode, choose how the timer ends. Instant turns off the moment the timer ends. Fade dims gradually to off. Sunrise does the opposite: it brightens gradually, the wake-up light, and starts WLED’s Sunrise mode right away. Use it with the light off to start, and remember WLED caps a sunrise at 60 minutes.
- Tap Start Timer.
The light counts down and turns itself off, even if you close the app, lock the phone or leave the house. This is WLED’s Nightlight from the top of this page, started from the phone. To stop early, come back to the same screen and tap Cancel Timer. With Fade, cancelling also puts the brightness back where it was when you started the timer, so the room isn’t left half dim. If you changed the brightness in the app while the timer ran, it goes back to that newer level instead. A change made somewhere else (the WLED page, another app) is left alone. If the light can’t be reached, the app says so and the timer keeps counting down on the light. Instant and Fade need a light that is on; with the light off the app says “Your light is already off.” Sunrise is the exception, since brightening an off light is the whole point.
On iOS the countdown also shows as a Live Activity on the Lock Screen and in the Dynamic Island (iOS only). Not seeing it? Open iOS Settings > Apps > WLED Max and turn on Live Activities.

Daily Schedule
Tap the Schedule tab. It always shows what is really on the light, read fresh each time you open the tab or pull down to refresh, so schedules made in WLED’s own web page or in Device Settings > Schedules show up here too.
- Tap + at the top of the list (on an empty list, the Add a schedule button does the same). The editor opens already filled in with the common case: Turn on at 6:00 PM, Turn off at 11:00 PM, every day. Both are time-of-day pickers, so tap a time to change it. An off time earlier than the on time is fine; the summary line then says “Off time is the next day.”
- Under Repeat, tap Every day, Weekdays or Weekend, or tap the single day chips.
- What turns on is optional. Just turn the light on brings the light back with whatever look it had. Load a preset picks one of your presets instead, so a preset built on the Sunrise effect (see the recipe above) fades the light up in the morning instead of jumping on.
- Tap Save. After a moment the row shows “Saved to your light.”
The schedule runs on the controller, not on the phone. WLED Max writes it into the light’s own timer slots as timed presets named “WLED Max Schedule On” and “WLED Max Schedule Off”, the same Time-controlled presets described in our sunrise and sunset schedule guide, so it keeps working when your phone is off, out of the house or out of battery.
Each row has a toggle, so you can pause a schedule and bring it back without opening it. Tap the row to change the times or delete it. A light has eight clock timer slots, and each daily schedule uses two of them (one for on, one for off), so it fits up to 4 schedules. The list comes in two groups:
- Daily schedules are the on and off pairs WLED Max made.
- Other schedules on this light lists every other timer, including sunrise and sunset ones. Each has its own switch, and tapping one opens the regular schedule editor.
- At the bottom, “N of 8 schedule slots used” counts both groups. When all eight are taken the app tells you instead of overwriting anything.
- Needs attention with “Off time missing” (or “On time missing”) means half of a pair was deleted somewhere else. Open it and tap Save to repair it, or delete it.
- “Turn off is paused on the light” means one half was switched off elsewhere. The row’s switch sets both halves again.
- “Your light’s schedules changed. Pull to refresh and try again.” shows up if another phone or the web page changed the light while you were editing.
- Renaming a “WLED Max Schedule On” or “WLED Max Schedule Off” preset makes it yours. Those timers move to Other schedules and the app never deletes them.
- When the light is offline you see the last list the app read, locked for editing, with a note to reconnect.
One requirement: the light has to know what time it is. If its clock isn’t set, a banner at the top of the Schedule tab offers a Set up time sync button. It opens Time & Macros (also under Device Settings); turn on Sync time automatically (NTP), check the UTC offset, and come back. Until then a saved schedule sits on the light but can’t fire.

Timer didn’t fire, or faded wrong
It switched off at once instead of fading. The mode is Instant. Change it in the nightlight section of Config > LED & Hardware (LED Preferences on 0.14 and 0.15), or pick Fade in the app.
A daily schedule didn’t fire. The light didn’t know the time. Open Schedule & Timer, switch to the Schedule tab and look for the clock banner; if it’s there, tap Set up time sync and turn on Sync time automatically (NTP). The light also needs Wi-Fi with internet access to fetch the time, and it has to be powered at the scheduled minute. A light that was unplugged at 6:00 PM stays off until the next day’s 6:00 PM.
The schedule fires an hour early or late. The light’s UTC offset is wrong, or daylight saving changed. Check it under Time & Macros, or pick the named time zone once in the web UI (Config > Time & Macros).
Wrong time. Check the time zone and NTP in Config > Time & Macros on the light, especially right after a daylight saving change.
Need more than 4 hours 15 minutes? 255 minutes is the firmware limit. For longer gaps, use a Daily Schedule, or have a device timer run an “off” preset at a fixed time.
Picking the right tool
Falling asleep with the lights on is what the nightlight is for. It needs nothing else. Waking up tomorrow to a slow sunrise is a job for a Daily Schedule that loads a Sunrise preset, or a WLED timer running that preset. Both live on the light, so set it once and forget about it. Sunrise and sunset triggers and seasonal date ranges are in Device Settings > Schedules (Time & Macros in the web UI). And if you’d like the color to follow the sun all day, that’s circadian lighting, a different setup.
Also handy: WLED widgets on iOS and Android, so a light is one tap from the home screen.