Smart Home Assistant

Home Assistant Wake Up Light: Build a Sunrise Alarm (UK)

SepehrBy Sepehr· 23 November 2026· Updated 23 November 2026· 7 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Stylised red sun rising over a dark navy horizon with rays above it

Key takeaways

  • A Home Assistant wake up light needs one time helper, one script and one automation, and takes about 30 minutes to set up.
  • Build the ramp as 30 one-minute steps from 1% brightness rather than one long transition, because bulbs handle long fades differently.
  • Add a while condition on the light's state so switching it off by hand stops the ramp instead of restarting it.
  • Set the helper to when the ramp starts, not when you want to be awake: 06:30 for a 30-minute ramp finishing at 07:00.
  • Use the Workday integration with United Kingdom and your subdivision so the light skips weekends and bank holidays.
On this page[tap to expand]

A Home Assistant wake up light automation fades a bedroom lamp from dim and warm to bright over about half an hour, so you wake to light instead of a buzzer. It needs one time helper, one script and one automation, and takes roughly 30 minutes to set up.

The catch is that bulbs handle long fades differently, so Step 2 builds the ramp from small steps that work on almost any dimmable light. Step 3 then skips weekends and bank holidays automatically, and Step 4 adds the safeguards that stop it lighting up a room you are not sleeping in.

Line chart of a bedroom light rising from 1 percent at 06:30 to 100 percent at 07:00 while warming in colour
The plan: a gentle start, a steady climb, and full brightness at the moment you want to be awake.

What do you need before you start?

  • A dimmable, colour-temperature-capable light in or near the bedroom. A white-ambiance smart bulb is enough, and our best smart bulbs guide covers sensible options. A bulb that only switches on and off cannot do a fade.
  • The light already working in Home Assistant, ideally controlled locally over Zigbee, Thread or Matter rather than through a cloud account, so the ramp still runs if the internet is down.
  • A recent Home Assistant version. The YAML below uses the current action: and trigger: syntax. If you are new to building automations, start with the Home Assistant automations guide.
  • The Workday integration if you want weekdays only. It is built in and added under Settings, Devices & services.
  • The Companion app only if you want the optional phone check at the end; see the notifications guide.

How long should a wake-up light take to reach full brightness?

Around 20 to 30 minutes is a sensible starting point, then adjust to taste. This is a comfort setting rather than a rule, so there is no official figure: a ramp that is too short feels like a light being switched on, and one that is too long means you are mostly lit while still asleep. Start at 30 minutes, then shorten it if you find yourself waking early.

The example in this guide starts at 1% brightness and a warm 2200 K, then climbs to 100% at 4000 K. Home Assistant describes lower Kelvin values as warmer and higher as cooler, so the light moves from amber towards a clearer white as the ramp progresses. Your bulb may not reach those exact figures, because every model has its own supported range, so check the colour temperature range shown on the light's entity page and stay inside it.

Step 1: Create a helper for the start time

A helper keeps the time out of the YAML, so you can change it from the dashboard or the phone app instead of editing code. In Settings, Devices & services, Helpers, choose Create helper, then Date and/or time. Name it Wake light start, tick Time only, leave Date unticked, and save.

This creates input_datetime.wake_light_start. Home Assistant's time trigger accepts an input_datetime entity directly, and a time-only helper fires every day. Set it to the moment the ramp should begin, not the moment you want to be fully awake. If you want full brightness at 07:00 and a 30-minute ramp, set the helper to 06:30.

Step 2: Build the sunrise script

Create a script in Settings, Automations & scenes, Scripts, switch to YAML mode and paste the following. Replace light.bedroom_lamp with your own entity ID.

alias: Wake up light
mode: single
sequence:
  - action: light.turn_on
    target:
      entity_id: light.bedroom_lamp
    data:
      brightness_pct: 1
      color_temp_kelvin: 2200
  - repeat:
      while:
        - condition: state
          entity_id: light.bedroom_lamp
          state: "on"
        - condition: template
          value_template: "{{ repeat.index <= 30 }}"
      sequence:
        - delay: "00:01:00"
        - action: light.turn_on
          target:
            entity_id: light.bedroom_lamp
          data:
            brightness_pct: "{{ [ (repeat.index * 100 / 30) | round(0) | int, 100 ] | min }}"
            color_temp_kelvin: "{{ 2200 + (repeat.index * 60) }}"
            transition: 60

The first action puts the light on at the lowest brightness Home Assistant allows, which its documentation gives as 1%. The loop then runs once a minute for 30 minutes, nudging brightness up by about a third of a percentage point each time and warming the colour by 60 K. The transition value is in seconds, and is the documented way to fade smoothly instead of switching instantly.

Why not one long transition of 1800 seconds? You can try it, and it is simpler to write. In practice bulbs and integrations differ in how long a single fade they accept, and some ignore the value, so the stepped loop is the version most likely to behave the same on every light. The while condition is also a useful safety valve: if you switch the light off by hand halfway through, the state is no longer on, the loop ends, and the lamp stays off instead of being switched back on a minute later.

Step 3: Start the script on workdays

Now create the automation that runs the script. First add the Workday integration if you have not already: choose United Kingdom as the country and pick your subdivision, because bank holidays differ between the nations. Holidays come from the underlying holidays library, so check the sensor's attributes the next time a bank holiday approaches to confirm it behaves as you expect.

Create a new automation in YAML mode:

alias: Wake up light on workdays
triggers:
  - trigger: time
    at: input_datetime.wake_light_start
conditions:
  - condition: state
    entity_id: binary_sensor.workday_sensor
    state: "on"
actions:
  - action: script.wake_up_light

Your Workday entity ID depends on the name you gave the entry, so copy the real one from the entity list. The sensor updates at midnight, so the condition is evaluated against the correct day when the trigger fires in the morning. If you want a lie-in on days off with a later ramp, duplicate the automation, change the condition to off, and point it at a second helper, input_datetime.wake_light_start_weekend.

Step 4: Add safeguards so it only runs when it should

A wake-up light that fires when it is not wanted is the quickest way to lose family goodwill. Add these conditions under conditions: as needed:

  • Someone is actually home. Add a state condition on your person entity, or on a zone count, so the room does not light up when you are away. The welcome home automation shows presence checks in more detail.
  • A holiday switch. Create a toggle helper called Wake light enabled and add a state condition requiring it to be on. A dashboard switch is much easier than editing YAML before a week away.
  • The lamp is currently off. Add a state condition on the light so the script does not take over a lamp somebody has already left on.

Keep the automation in mode: single, which is the default, so a second trigger cannot launch a second copy of the script while the first is still ramping.

Step 5: Test the ramp without waiting until morning

Do not wait for 06:30 to find out it works. From the Scripts page, choose Run on the script. Watch the light page in Home Assistant for two or three minutes and confirm the brightness percentage ticks upwards and the colour temperature creeps up with it. If you want to see the whole sequence quickly, temporarily change delay to "00:00:05" and transition to 5, run it, then put both back.

Then test the automation itself. Set the helper to two minutes from now with the Workday condition removed, wait for it to fire, and confirm the script appears in the automation's trace. Restore the condition afterwards. Traces are the fastest way to find out which condition stopped a run, so open the trace first whenever it misbehaves.

Step 6: Turn the light off after you are up

At the end of the ramp the lamp will sit at 100% until you do something. Add a second automation that switches it off when you leave the bedroom, or after a fixed time. A simple, predictable option is a time trigger a couple of hours after the ramp ends that calls light.turn_off on the lamp. If you already use a motion sensor in the room, the motion night light automation pairs well: the same sensor can handle low-level light at night and switch the lamp off in the morning.

At night, the reverse is a goodnight routine that turns everything off at once; see the bedtime routine guide.

Common problems and fixes: why does the light jump to full brightness or never fade?

It jumps straight to bright: the bulb is ignoring the transition. Because the script already steps the brightness every minute, this should only happen if a step is larger than intended, so check that repeat.index * 100 / 30 is still in the template and the loop count is 30.

Nothing happens at all: open the automation trace. The usual causes are a Workday sensor that is off, a condition that references the wrong entity ID, or a helper that has both date and time enabled and therefore fires only once.

The colour never changes: the bulb may be dimmable only. Remove the color_temp_kelvin lines and keep the brightness ramp.

The light stops partway through: something turned it off, which is exactly what the while condition is for. A smart switch, a motion automation or a voice command can all end the ramp, so check the logbook for what changed the state.

The light flickers at the lowest level: some bulbs are unstable at 1%. Raise the starting brightness_pct to 3 or 5 and adjust the step maths to match.

What should you build next?

Once the basic ramp works, you can build on it: add a gentle speaker or a smart alarm clock for people who sleep through light alone (our best smart alarm clock guide has hardware), open smart blinds after the ramp, or start the heating shortly before you wake. All of these hang off the same helper, so changing your wake time stays a single edit.

Buy the picks in this guide

Recommended for Smart Lighting

See all devices →
Shop these picks on our Amazon storefront →

Frequently asked questions

Can Home Assistant fade a light slowly like a sunrise alarm?
Yes. Home Assistant can fade any dimmable light by calling the light.turn_on action with a brightness and a transition, which Home Assistant documents as the duration in seconds it takes to reach the next state. For a slow sunrise, the most reliable approach is a script that raises brightness in small steps every minute for about 30 minutes, because bulbs and integrations differ in how long a single transition they will accept. A colour-temperature bulb can also warm gradually from around 2200 K towards 4000 K as it brightens. The main caveat is hardware: a bulb that only switches on and off cannot fade, and every bulb has its own supported brightness and colour range, so check the light's entity page first and test the script manually before relying on it.
How do I stop my Home Assistant wake up light running at weekends?
Add the built-in Workday integration, choose United Kingdom as the country and pick your subdivision, then use its binary sensor as a state condition in the automation so it only runs when the sensor is on. The sensor checks today's date against the holidays library for your chosen country and subdivision and updates at midnight. That means weekends and bank holidays are skipped without any extra YAML. For a later weekend lie-in, duplicate the automation, set the condition to off and use a second time helper. Your sensor's entity ID depends on the name you gave the entry, and it is worth checking the next bank holiday to confirm it behaves as expected for your area, since the dates can differ between the UK nations.
Why does my smart bulb ignore the transition time in Home Assistant?
Some smart bulbs and integrations ignore the transition value, or cap how long a single fade can last, so a request for a 30-minute fade may simply snap to the new brightness. Home Assistant passes the value through, but the light decides what to do with it. The practical fix is the stepped method in this guide: raise brightness a little every minute and use a short transition of around 60 seconds for each step, so even a bulb that only manages short fades still produces a smooth overall sunrise. If the colour never changes, the bulb is probably dimmable only, so remove the colour temperature line and keep the brightness ramp. Some bulbs also flicker at 1%, in which case start at 3 to 5%.

Sources

Sources verified 2026-11-23

  1. Home Assistant — Turn on light (light.turn_on action)
  2. Home Assistant — Time trigger
  3. Home Assistant — Workday integration
  4. Home Assistant — Light integration
  5. Home Assistant — Script syntax: repeat a group of actions
›How we researched this

Claims in this article are checked against primary sources — manufacturer specifications, official documentation, Which? research, Ofgem guidance, or gov.uk — rather than forum threads or video reviews. Where the author has direct hands-on experience with a product (most Home Assistant, Zigbee, and home-networking gear is running in his own homelab), that is stated explicitly in the text.

For categories outside that personal setup — such as boilers, heat pumps, and other areas that are traditionally a heating engineer's domain — verdicts are built from cross-referenced manufacturer data, published lab results, and vetted expert and owner reviews rather than a claim of personal hands-on testing. See the editorial policy for the full methodology.

Sepehr

Written by

Sepehr

10+ years hands-on with Home Assistant & networking · Research-backed elsewhere · No brand deals

Smart home specialist with 10+ years running a self-hosted Home Assistant setup — Zigbee2MQTT, Frigate NVR, and local-first automations. Independent coverage for UK homes, no brand deals.

LinkedIn →

Citing this page? Please use a dofollow link back to the original article — it helps us keep the data on this page accurate and up to date.

Related reading