Adaptive Cover Controller is a Home Assistant blueprint for automatically controlling curtains, blinds and shutters based on the sun's position.
Protection is determined using the sun's azimuth and elevation, with optional weather, effective sky obstruction, occupancy and schedule validation. Each cover runs as its own automation and can be configured independently.
Note
AI-assisted development
This project was developed using AI as an engineering tool - not as a replacement for engineering.
AI assisted with brainstorming, code reviews, documentation and iterative refinement, while all architectural decisions, implementation choices and real-world testing were carried out by the project author.
Copy:
adaptive_cover_controller.yaml
to:
config/blueprints/automation/
Reload Blueprints and create a new automation using Adaptive Cover Controller.
- Sun position control using azimuth and elevation
- Built-in sun protection on/off switch, to suspend sun-triggered protection for a cover entirely (e.g. over winter) without touching anything else
- Optional weather validation
- Optional effective sky obstruction validation with hysteresis — accepts a plain cloud-cover-percentage sensor, or a more sophisticated computed obstruction sensor if you have one
- Optional occupancy validation
- Three-tier protection level (FULL / PARTIAL / NONE) — tilt-capable covers can hold position and adjust tilt instead of fully opening on light cloud
- Adaptive tilt for Venetian blinds, reacting continuously to live sky obstruction
- Full day/night scheduling — independent weekday and weekend opening and closing times, each individually toggleable per cover
- Scheduled closing takes priority over sun protection, so a cover can never be reopened by the sun once it's closed for the night
- Manual override detection, with a configurable timeout to automatically resume automatic control
- Automatic recovery after Home Assistant restarts
- Individual configuration for every cover
Each automation controls a single cover.
The blueprint is organised into the following sections:
- Cover
- Sun Protection
- Positions
- Schedule
- Weekday Schedule
- Weekend Schedule
- Manual Override
- Occupancy
- Weather Validation
- Effective Sky Obstruction
- Blind Features
- Advanced
Scheduled opening and scheduled closing are independent toggles in the Schedule section, each on by default:
- Scheduled opening — when on, returning to the normal position waits until the configured opening time. When off, the cover returns to normal as soon as protection is no longer needed, any time of day.
- Scheduled closing — when on, the cover closes to the configured Night position at the closing time, regardless of sun protection, and stays closed until the next opening time. When off, this cover is never closed by schedule — only by sun protection or manually.
Weekday and weekend opening/closing times, and which days each applies to, live in their own collapsed Weekday Schedule and Weekend Schedule sections.
If Manual Override is enabled, create one Input Select helper for each cover with the following options:
normal
automation
manual
Do not share the same helper between multiple covers.
A manual change is detected automatically and pauses the automation until either the cover is returned to the position the automation would choose, or the configured Manual override timeout elapses — whichever comes first. Set the timeout to 0 to disable it and require a matching position to resume automatically.
Sun protection enabled decides whether sun-triggered protection applies to this cover at all. Turn it off — for example over winter, when the sun's warmth is welcome — and the cover ignores the sun entirely. Scheduling keeps running either way.
When sun protection is enabled, sun position, weather validation and occupancy validation form a single gate. If any of them fail, protection isn't needed right now — no further checks are required.
Once the gate passes, effective sky obstruction sets the protection level:
- FULL — obstruction is low enough that full sun protection is needed. The cover moves to its protection position (and, for tilt-capable covers, its protection tilt).
- PARTIAL — tilt-capable covers only. Obstruction has risen, but the sun is still in the configured window, so the cover stays in position rather than fully reopening — only the tilt angle adjusts, continuously, to the live reading. Covers without tilt don't have this middle state; they simply reopen once obstruction rises far enough.
- NONE — either the gate failed, or (for covers without tilt) obstruction is high enough that protection isn't needed at all.
Scheduled closing sits above all of this. If enabled, once the configured closing time arrives the cover closes to its Night position and stays there — regardless of what protection would otherwise decide — until the next opening time. A scheduled close can never be reopened by the sun still being out.
Before any movement happens — closing for the night, protecting, or returning — the automation checks that the cover is idle, isn't currently held in manual override, and that Home Assistant is fully running. Returning to the normal position additionally respects scheduled opening, if enabled.
To avoid unnecessary movement, commands are only sent when the requested position or tilt differs from the current state.
- Home Assistant 2025.7 or later
- One supported cover entity
- One Input Select helper per cover when using Manual Override
Released under the MIT License.


