Schedule blinds to open at sunrise and close at sunset

Last updated:

Includes Home Assistant automation

This automation ties your blinds to local sunrise and sunset instead of the clock, opening at dawn and closing at dusk. A fixed opening time drifts out of step as the season moves, so you end up back in the app resetting it.

daylightdaylightnoyesdusk30 minutes after sunriseAt 07:0015 minutes before sunsetafter sunrise plus 30minutes and time after07:00Nothing happensOpen cover (bedroomblind and landing blind)Close cover (bedroomblind and landing blind)
Trigger Condition Action Wait Nothing

What you need

  • Motorized blinds or shades. Purpose-built smart blinds are one route. A retrofit motor that goes inside the roller tube you already have is another, and it keeps the fabric and fittings you chose. Motorizing the wand on the blinds already at the window is a third, though that one is more often a build than a purchase.
  • A hub or platform with sunrise and sunset triggers. Every mainstream one has them.
  • Optional: a light sensor at the window.

Retrofit kits fit one tube diameter, not any tube, so measure the outer diameter of your roller before ordering.

How it works

Two rules. At sunrise, open. At sunset, close.

Then you tune the two ends. Mornings take an offset and a floor. The offset opens the blind a little after sunrise rather than at it, and half an hour is a reasonable place to start. The floor is an earliest hour you are willing to be woken. Whichever of the two lands later is the one that opens the blind. In June that is the floor. In December it is sunrise, and the blind opens when there is finally something to let in.

A room where you want the light the moment it exists gets its floor set to midnight, which drops it out of the rule. In the block below that means both the 07:00 trigger and the 07:00 condition, not just the trigger.

Evenings only need the offset. Once the light outside falls below the light inside, an open window stops being a view out. It becomes a view in. Closing a little ahead of sunset gets in front of that.

When sunrise is not the same as light

Sunrise is a geometry event. It is the moment the sun clears the horizon at your coordinates, and it arrives on time whether or not any of that light reaches your room. A hill, the house opposite, or an overcast December morning all open a gap between the sun being up and the room being usable. The offset and the floor are rough stand-ins for measuring that gap, and at most windows they are enough.

The sensor does not have to go on every window. The one or two you sit beside in the morning are where the gap between the sun being up and the room being light is something you actually notice. The rest run fine on the schedule alone.

The block below is the offset and floor version. A lux threshold is an addition on top of it, and only for those windows.

Tracking the sun through the day, tilting the slats as it crosses the glass, is a different automation on a different trigger. That one is adaptive blind positioning, driven by glare and heat. This page is the two bookends.

What your platform can actually schedule

The plain version runs anywhere. Sunrise and sunset are standard triggers on every mainstream platform, and all of them let you shift the trigger by a set number of minutes.

The floor is what separates them, because it asks the automation to compare two times instead of firing on one. Home Assistant and Homey take it directly, as two triggers with a condition on each branch that discards whichever fired first. Google Home's script editor holds the same shape, since it allows solar events in both a schedule starter and a time condition. SmartThings reaches it through the Rules API rather than the routine builder. Alexa takes one trigger per routine, so the two halves are already two routines, and a floor stacked on top is past what a routine holds. Apple Home's own editor will not put a sun restriction on a clock-triggered automation, so the floor there means converting it to a shortcut and comparing the two times yourself.

If your platform will not hold the floor, run the plain sunrise version and leave it out of the bedroom.

Watch out for

Someone will pull a blind down mid-afternoon because the sun is in their eyes. On a twice-a-day schedule that is harmless. Nothing else fires until sunset, and the next morning starts clean. Add the lux threshold and it changes, because the rule now re-evaluates all day and will undo a deliberate choice minutes after it was made. If you go that way, give a manual move a grace period, and let the schedule pick up the next day.

A sun schedule also has no business needing the cloud. The times come from the date and your location, and your hub knows both. With local control, over Matter and Thread or a local radio, the blinds keep their routine through an internet outage. On a cloud routine platform they do not.

This idea is shared for inspiration only, not professional advice. If it involves wiring, breakers, or high-draw appliances, verify ratings and your local electrical code, or hire a licensed electrician. Read our full disclaimer.

Get the Home Assistant Automation YAML

Validated against Home Assistant 2026.8.3 Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

Example automation (Home Assistant). A starting point; swap in your own entity names.

alias: Blinds follow sunrise and sunset
description: >-
  Opens the blinds once it is properly light (half an hour after sunrise, but
  never before 07:00) and closes them shortly before sunset. Swap in your own
  cover entities and times.
mode: single
triggers:
  - trigger: sun
    event: sunrise
    offset: "00:30:00"
    id: daylight
  - trigger: time
    at: "07:00:00"
    id: daylight
  - trigger: sun
    event: sunset
    offset: "-00:15:00"
    id: dusk
actions:
  - choose:
      # Two triggers feed this branch so that whichever lands LATER is the one
      # that opens the blinds: the 07:00 floor in summer, sunrise in winter.
      # The conditions are what discard the earlier of the two.
      - conditions:
          - condition: trigger
            id: daylight
          - condition: sun
            after: sunrise
            after_offset: "00:30:00"
          - condition: time
            after: "07:00:00"
        sequence:
          - action: cover.open_cover
            target:
              entity_id:
                - cover.bedroom_blind
                - cover.landing_blind
      - conditions:
          - condition: trigger
            id: dusk
        sequence:
          # To cut the lit-window effect without giving up the view, swap this
          # for cover.set_cover_position at 50 on covers that support it.
          - action: cover.close_cover
            target:
              entity_id:
                - cover.bedroom_blind
                - cover.landing_blind

That automation is yours to keep

Get a fresh idea like it - plus the week's smart home news and gear - in your inbox every Friday. Free, and unsubscribing is one click.

Related Ideas

Tagged: blinds, sunrise-sunset, daylight, scheduling

Want more ideas like this?

Fresh automation ideas plus the smart home news and gear worth knowing, in your inbox every Friday.