Loading Now

Blinds That Follow the Sun

Flat editorial illustration: a large sun arcing across the sky above abstract window frames whose blinds tilt to track its angle, one showing a TV glow.

Clock-based blind schedules are wrong twice a season and wrong all day when it’s overcast. Mine run on two numbers instead: how much sun is hitting the house, and where the sun is. Physics doesn’t need a schedule.


the two numbers

Everything in this flow keys off two sensors.

Solar radiation, in W/m², from a weather station on my roof. Radiation tells you what the sky is doing to your windows right now. 850 W/m² in July means heat pouring through the west glass; 120 on an overcast morning means open everything, no schedule can know that.

Sun azimuth, computed for free by Home Assistant’s sun integration, tells you which side of the house is getting cooked. Radiation without azimuth closes blinds on the shaded side for no reason. Azimuth without radiation closes them under full cloud. Together they answer the only question that matters: is direct sun hitting this window hard enough to care?

the day, as the blinds see it

I run this in Node-RED because the logic is a state machine that reads better as a flow than as YAML. The day breaks into bands:

Dawn. Light outside crosses a threshold, blinds tilt to a soft open. Gentle light, no schedule, so it self-adjusts across the seasons.

Mid-morning through afternoon. The core loop. Every state change from the radiation sensor re-evaluates: azimuth says which windows face the sun, radiation says how hard it’s hitting. Above the hot threshold on the sun-facing side, tilt closes toward blocking; the other sides stay open. As azimuth sweeps around the house through the day, the closed side follows it, east windows in the morning, west in the late afternoon, like a very slow wave.

Dark. Outside light collapses, all blinds close for privacy. Also the failure default: sensor unavailable means privacy-closed at night, open-tilted during the day, and nothing thrashes.

Hysteresis keeps it sane. Close at 700 W/m², reopen below 500, and a cloud passing over doesn’t turn the living room into a semaphore station. The gap between thresholds matters more than the thresholds themselves; I tuned mine by annoyance, which is the correct instrument.

the party trick

The living-room TV turning on closes the one blind that puts glare on the screen, whatever the sun logic thinks it should be doing. TV state change arrives in the flow, glare blind closes, a flag latches so the solar loop leaves it alone. TV off releases the flag and the blind rejoins the physics. Guests ignore the whole solar system and lose their minds at this one. Fine. It’s four nodes.

Occupancy feeds in the same way: the family-arrival state opens things up, everyone-gone sets the away positions. Those override daytime logic the same way the TV does, a latch on top of the loop, released when the state clears.

why node-red for this one

Most of my automations live in plain HA YAML, and I like it there: versionable, auditable, greppable. This flow stays in Node-RED because it’s one continuous decision surface with three override latches, and in YAML that becomes six automations sharing helpers, with the logic smeared across them. In a flow you can see the whole state machine at once: sensor nodes on the left, the tilt decision in the middle, override latches hanging off the top. When it misbehaves you watch messages move through it and find the bad node in a minute.

Rule of thumb I’ve landed on: discrete event → action pairs go in YAML; anything that behaves like a control loop goes in Node-RED.

stealing this

You need tilt-capable covers in HA (mine are Z-Wave), the sun integration (free, built in), and some light-intensity signal. A roof weather station is the deluxe option; a cheap outdoor lux sensor gets you most of the behavior, and one reader-tested alternative is deriving “bright” from your solar inverter output if you have panels. Map your windows to compass facings once, on paper, before touching the flow.

The exported flow JSON with generic entity names is linked below the diagram in this post. Two build notes: scrub your own export before sharing (Node-RED embeds server paths and node ids), and put the hysteresis in from the start; a flapping blind converts a spouse from neutral to hostile in under a day.


Weeks of tuning, and now the house tracks the sun the way a sunflower does, slowly, without being asked. The TV trick still gets the applause. The physics does the work.

My name is Skylar Pearce, I have been working as a System Administror since 2013 as well some side consulting work. During my career I have worked with everything from Active Directory and vCenter to configuring routers and switches and phone systems, documenting and scripting my way through the whole thing. I have a Security+ certification and am currently working on my PenTest+. Throughout my career I have gained almost all of my knowledge from blogs like this. It is now time for me to pay it back. Over time I have gathered scripts and tricks over the years that I will share on this site. A lot of the posts here will be mainly reference posts, some will be full on how to’s. I am happy to go into more depth on any other topics I go over here, just make a comment on a post. I will do my best to post once a day on weekdays but as I run out of ideas it may slow down. My WordPress skills are still growing so the site will likely get better over time as I learn. You can reach me at contact@allthesystems.com or on LinkedIn

Post Comment