Smart Home Assistant

Home Assistant Blinds Automation: Sunrise, Sunset and Sun Glare (UK)

SepehrBy Sepehr· 24 November 2026· Updated 27 November 2026· 6 min read
✓ Independent — no paid placements✓ UK-tested in real homes✓ Cited sources
Sunlit living room with orange armchairs and a striped zebra blind casting bright diagonal shadows across the wall

Key takeaways

  • A Home Assistant blinds automation should trigger on sunrise and sunset with an offset, because fixed clock times drift by hours across the UK year.
  • In Home Assistant, cover position 0 means fully closed and 100 means fully open, so set_cover_position can hold a blind partly shut.
  • A numeric_state trigger on the sun.sun elevation attribute, such as above 25, fires once when the sun crosses that angle, not repeatedly.
  • Gate the glare rule with a weather condition such as sunny or partlycloudy so blinds stay open on overcast days.
  • Add a toggle helper like input_boolean.blinds_auto_mode as a condition so you can override the automation by hand without a fight.
On this page[tap to expand]

A Home Assistant blinds automation opens your smart blinds at sunrise, closes them at sunset and, if you want, lowers them when strong sun hits the window. You need one motorised blind that shows up as a cover entity, plus about 30 minutes to build and test it.

The trap is hard-coding clock times. Sunrise in the UK moves by hours across the year, so a blind that opens at 07:00 is wrong for months. This guide uses the sun itself as the trigger. If you are new to the editor, start with our Home Assistant automations guide.

What do you need before you start?

  • A motorised blind, shade or curtain motor in Home Assistant. Anything that appears as a cover entity works, whether Zigbee, Matter, Z-Wave or Wi-Fi. Home Assistant's cover page lists the actions you will use: open, close, set position and stop. If you have not bought one yet, our best smart blinds in the UK roundup compares the options.
  • The Sun integration. It is enabled by default on most installs and provides sunrise, sunset and the sun's elevation and azimuth. Elevation is the angle between the sun and the horizon, and negative values mean the sun is below it.
  • Your blind's entity ID. The examples use cover.living_room_blind. Find yours under Settings, Devices & services, Entities.
  • Optional: a weather integration and a toggle helper, used in Steps 4 and 5.

Step 1: Check the blind reports a real position

Before automating anything, open the blind's entity page and move it from the more-info dialog. Confirm it opens, closes and stops, and note whether it offers a position slider.

Home Assistant defines position as a percentage where 0 means fully closed and 100 means fully open. Some cheap motors only offer open, close and stop with no slider. They still work for Steps 2 and 3, but you cannot use partial positions in Step 4.

Also test the travel time. If a blind takes 40 seconds to move, you will want to know that before you schedule it ahead of an alarm.

Diagram of three blind rules: open fully at sunrise, mostly closed in strong sun, closed at sunset
The three rules built in this guide. Position 0 is closed and 100 is open.

Step 2: Open the blind at sunrise

Create a new automation in Settings, Automations & scenes, switch to YAML mode and paste the block below. The sun trigger takes an event of sunrise or sunset and an optional offset, written as seconds or HH:MM:SS. A positive offset fires after the event and a negative one before it.

alias: Living room blind - open at sunrise
description: Open the blind half an hour after sunrise
mode: single
triggers:
  - trigger: sun
    event: sunrise
    offset: "00:30:00"
actions:
  - action: cover.set_cover_position
    target:
      entity_id: cover.living_room_blind
    data:
      position: 100

The half-hour offset avoids opening the blind into a dim, grey pre-dawn. In midwinter you may prefer a negative offset so the room is not dark when you get up. For a gentler start to the morning, pair it with our wake-up light automation.

Step 3: Close the blind at sunset

Add a second automation for the evening. Closing slightly before sunset gives privacy before your lights come on, which is when a lit room is most visible from the street.

alias: Living room blind - close at sunset
description: Close the blind 15 minutes before sunset
mode: single
triggers:
  - trigger: sun
    event: sunset
    offset: "-00:15:00"
actions:
  - action: cover.set_cover_position
    target:
      entity_id: cover.living_room_blind
    data:
      position: 0

If you want the blinds to be part of a wider evening routine, add them to your goodnight script as well, so one button press leaves the whole house closed up.

Step 4: Lower the blind when the sun is strong

This is the step that makes the setup feel smart. A numeric state trigger can watch an attribute rather than a state, and Home Assistant's own documentation uses the elevation attribute of sun.sun as its example. The trigger fires when the value crosses your threshold, not repeatedly while it stays above it.

alias: Living room blind - sun glare
description: Drop the blind to 30 percent when the sun climbs high
mode: single
triggers:
  - trigger: numeric_state
    entity_id: sun.sun
    attribute: elevation
    above: 25
conditions:
  - condition: state
    entity_id: weather.home
    state:
      - sunny
      - partlycloudy
  - condition: time
    after: "09:00:00"
    before: "17:00:00"
actions:
  - action: cover.set_cover_position
    target:
      entity_id: cover.living_room_blind
    data:
      position: 30

Treat 25 degrees as a starting point, not a rule. The right number depends on which way the window faces and what is outside it, so watch the room for a few sunny days and adjust. Home Assistant's weather states include sunny, partlycloudy, cloudy and rainy, which is why the condition above skips overcast days. Check the entity name of your own weather integration, because weather.home is only the common default.

Elevation also tells you about direction indirectly. The Sun integration provides azimuth too, measured clockwise from north, so a south-facing window and a north-facing window need different thresholds. You can duplicate this automation per room with its own number.

Step 5: Add a manual override

Nothing is more annoying than closing a blind to watch TV and watching it spring open again. Create a toggle helper called "Blinds auto mode" under Settings, Devices & services, Helpers, then add this condition to every blind automation:

  - condition: state
    entity_id: input_boolean.blinds_auto_mode
    state: "on"

Turn the helper off when you want manual control, for example on a day off or when you have guests. A simple dashboard button for it takes a minute. The same idea works for holiday periods, and our holiday mode guide shows how to make blinds and lights look lived in while you are away.

Step 6: Save energy by closing blinds against heat and cold

Blinds also affect heating comfort. In summer, lowering them when the sun is high can stop a south-facing room overheating. In winter, closing them at dusk adds a layer between the room and cold glass. The condition in Step 4 already handles summer glare. For heating, our guide to turning off heating when a window is open uses the same triggers-and-conditions approach.

Why does my blind not move or move at the wrong time?

The blind ignores the automation: open the automation's Traces view. If the trigger fired but the action failed, the entity ID is usually wrong or the motor is offline. Run the action manually from Developer tools, Actions to test the blind in isolation.

It fires at an odd time: the Sun integration reports times in UTC internally, but Home Assistant triggers use your configured time zone. Confirm your time zone under Settings, System, General. If you recently changed it, restart Home Assistant. Sunset offsets also fall at the wrong time of day after a sunset-related regression; see our note on sunset offsets firing late.

The glare automation never triggers: a numeric state trigger only fires when the value crosses the threshold. If the sun is already above 25 degrees when you save the automation, nothing happens until the next crossing tomorrow. Test by temporarily lowering the threshold or by running the actions manually.

The blind opens again straight away: two automations are fighting. A sunrise rule and a glare rule can both fire in the same morning. Give them separate time conditions or merge them into one automation with choose blocks.

Position steps do nothing: your motor may support only open and close. Use cover.open_cover and cover.close_cover instead of set_cover_position.

The same sunrise and sun-glare routines work for curtains. If you need the hardware, see the best smart curtain motors for the UK.

What should you build next?

Once one room works, copy the three automations for each blind or group several blinds as a target list. You can also trigger them from a presence sensor or a bedroom wake-up alarm. Keep the helper from Step 5 in place so that you can always take back control.

Buy the picks in this guide

Recommended for Home Automation

See all devices →

Frequently asked questions

How do I automate blinds in Home Assistant?
To automate blinds in Home Assistant, make sure the motor appears as a cover entity, then create an automation with a sun trigger set to sunrise or sunset and an action of cover.set_cover_position. Position 0 closes the blind and 100 opens it fully. Use an offset such as 00:30:00 after sunrise or -00:15:00 before sunset so the timing suits your routine. Using the sun instead of clock times means the schedule follows the seasons automatically, which matters in the UK where sunrise moves by several hours between winter and summer. One caveat: motors that only support open, close and stop cannot take partial positions, so use cover.open_cover and cover.close_cover instead. Test each action manually from Developer tools before relying on the schedule.
Can Home Assistant close blinds when the sun is too strong?
Yes. Home Assistant can close blinds against strong sun with a numeric_state trigger on the sun.sun entity's elevation attribute, firing when elevation rises above a threshold such as 25 degrees. Add a weather condition so the rule only runs on sunny or partly cloudy days, and a time condition to limit it to daytime. Then call cover.set_cover_position with a value such as 30 to leave a little light in. The threshold is a starting point rather than a fixed rule, because window direction and nearby obstructions change when glare actually reaches the room. A numeric_state trigger only fires when the value crosses the threshold, so it will not run if the sun is already above it when you save the automation.
Why do my smart blinds open at the wrong time in Home Assistant?
Smart blinds open at the wrong time in Home Assistant most often because of a time zone mismatch, a wrong offset or two automations overlapping. Check your time zone under Settings, System, General, and confirm the sun trigger's offset sign, since a positive offset fires after the event and a negative one fires before it. Open the automation's Traces view to see exactly when it fired and which action ran. If a sunrise rule and a glare rule both fire in the morning, the blind may move twice, so separate them with time conditions or combine them with choose blocks. Finally, check the motor itself, because some devices ignore commands while they are still moving.

Sources

Sources verified 2026-11-24

  1. Home Assistant — Sun integration
  2. Home Assistant — Cover integration
  3. Home Assistant — cover.set_cover_position action
  4. Home Assistant — Numeric state trigger
  5. Home Assistant — Weather integration
›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