This automation reads the sun's compass bearing and height, then angles or lowers your blinds before the glare and heat land. Otherwise somebody has to walk the windows twice a day, judging by eye which rooms are about to bake.
What you need
The hardware list is short.
- Blinds with a motor your platform can address. Buy them motorised, or retrofit a motor into the blinds you already own. Retrofit motors for roller blinds slide into the tube and are sold by tube diameter, so measure before you order. One kit covers tubes of 25 to 30 mm and needs a blind at least 57 cm wide. Another covers tubes of 38 to 51 mm.
- A platform that knows where the sun is, not just when it rises and sets. Home Assistant publishes the sun's compass bearing and its height above the horizon as live numbers you can trigger on.
- No wiring, if you choose well. One retrofit motor runs off an internal battery that recharges over USB-C and lasts up to a year on typical use. It speaks Matter over Thread, so it joins Apple Home, Google Home, SmartThings or Home Assistant without a vendor bridge.
- Optional: a light sensor. Sun position knows nothing about cloud, so a light reading is the usual addition. It is a trigger you wire in on top of the automation below, and the last section says how to keep it stable.
- Or build it yourself. A stepper motor on the tilt rod, driven by an ESP32 running ESPHome, lands around 45 dollars a window against just under 100 for off-the-shelf motors. Budget for a real project rather than an evening. Most of that time goes on the part you cannot see moving: stall detection, and teaching the motor to find its own zero again.
Tilt or lower: pick the axis first
Venetian and wood blinds move two ways. The whole stack lifts and drops, and the slats rotate on their own axis. Roller blinds and shades only do the first, and that one difference decides what this automation can win for you.
Sunlight arrives at an angle, which makes the slat angle the control worth automating. Tilt the slats against the sun and the glare goes while the room stays bright and the window still shows the garden. Lower the whole blind instead and you have traded a hot bright room for a dark one with the lamps on.
A roller blind still earns the trigger. It just charges you for it, because taking the sun off the desk means covering the window that was giving you the view. Partial coverage is the compromise: drop it far enough to shade the seating and leave the top strip clear, so daylight still reaches the ceiling. To do that, swap the tilt command below for cover.set_cover_position and find the height by eye on a bright afternoon.
How it works
Your hub needs no sensor to know where the sun is. It computes the position from your latitude, longitude and the clock, then publishes two numbers. The bearing is the compass direction the sun sits in. The elevation is how far it has climbed above the horizon.
A window takes direct sun only while the bearing is inside a band. A west-facing one is in the firing line from the southwest round towards northwest. So the automation watches for two things to become true together: the bearing inside your band, and the sun high enough to clear the rooftops opposite. When both hold, the slats go to a shallow angle. When the bearing leaves the band, or the elevation drops at dusk, they open again.
Get the next idea in your inbox
Automation ideas like this one, plus the week's smart home news and gear. Every Friday, free.
Both halves need their own trigger, and this is where a first attempt usually breaks. On a west window the sun is already high when it swings into the band, so the bearing alone seems to be enough. Point the same rule at an east window and it never fires: the sun crosses into the band while it is still below the rooftops, the height check fails, and nothing re-evaluates as it climbs. So the automation triggers on the height crossing too, and checks the bearing at that moment.
The band belongs to your window. The calendar walks the sun through it, arriving hours apart in June and December, and the numbers never need touching. A time-based rule has to be re-guessed every few weeks to keep up.
The same two numbers drive lighting on sun position. That page uses them to bring light in as the day fades; this one uses them to keep light out while the day is at its strongest.
Does this work without Home Assistant?
Yes, though usually from the blind's own app rather than from your platform. Some motors bring the logic with them. One retrofit roller motor offers an adaptive shading mode that moves the blind on the sun's position to cut heat build-up. One wood blind range ships with tilt logic that adjusts through the day for glare and heat while keeping the view. You write nothing, and you live with whatever band and angles the vendor picked.
Alexa, Google Home and Apple Home will all run a blind at sunrise or sunset with an offset. That is the blunt version of this idea, and for an east-facing bedroom it is genuinely enough. What they will not hand you is a trigger on the sun's bearing, and the bearing is what makes the rule specific to your window instead of to your time zone. That part wants Home Assistant.
Watch out for
An indoor light sensor on the window you are controlling sits inside the loop it is driving. Close the slats and the reading falls, which can push the rule straight back to open, and the blind hunts back and forth all afternoon. It is still the easiest place to mount one, and it works, but only if the two thresholds are far enough apart that closing the blind cannot drag the reading past the reopen point. Find the closed-slat reading on a bright day and set the reopen threshold well below it. Mounting outdoors, or on a window the automation never touches, sidesteps the problem instead of tuning around it.
Then expect the blind's idea of its own position to drift. Somebody will always reach over and turn the wand by hand, and a motor counting from where it last thought it was has no way to notice. The builds that survive daily use can find a hard stop again and re-zero against it. That is what lets a person move a blind by hand on a whim without breaking the automation for the rest of the week.
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
Example automation (Home Assistant). A starting point; swap in your own entity names.
alias: Tilt the west blinds away from the afternoon sun
description: >-
Angles the slats while the sun is both on the west window and high enough to
clear the rooftops, and opens them again once either stops being true.
mode: single
triggers:
- trigger: numeric_state
entity_id: sun.sun
attribute: azimuth
above: 240
id: sun_reaches_window
- trigger: numeric_state
entity_id: sun.sun
attribute: elevation
above: 6
id: sun_climbs_high
- trigger: numeric_state
entity_id: sun.sun
attribute: azimuth
above: 310
id: sun_leaves_window
- trigger: numeric_state
entity_id: sun.sun
attribute: elevation
below: 6
id: sun_drops_low
conditions: []
actions:
- choose:
- alias: The sun is on the glass and high enough to matter
conditions:
- condition: trigger
id:
- sun_reaches_window
- sun_climbs_high
- condition: numeric_state
entity_id: sun.sun
attribute: azimuth
above: 240
below: 310
- condition: numeric_state
entity_id: sun.sun
attribute: elevation
above: 6
sequence:
- action: cover.set_cover_tilt_position
target:
entity_id: cover.living_room_blinds
data:
tilt_position: 30
- alias: The sun has moved off the glass
conditions:
- condition: trigger
id:
- sun_leaves_window
- sun_drops_low
sequence:
- action: cover.set_cover_tilt_position
target:
entity_id: cover.living_room_blinds
data:
tilt_position: 100
Related Ideas
Tagged: window-coverings, sun-tracking, glare-control, heat-management