Smart Venetian Blinds — A focused integration for venetian blind slat control via sun position

Hey everyone,

I want to share a custom integration I’ve been working on: Smart Venetian Blinds.

A quick disclaimer upfront: this was developed with the help of Claude (the AI assistant by Anthropic), and I’m using it personally every day. I’m quite satisfied with how it performs and especially with how smooth the configuration experience in the UI is.

What it does (and what it deliberately doesn’t do):
This integration is intentionally scoped to venetian blinds only — not roller shutters, not awnings. The focus is on calculating the precise slat angle that blocks direct sunlight while keeping as much daylight as possible.
That single focus allowed me to do the geometry properly and make the UI configuration feel clean.

How it works:
It calculates the optimal tilt angle from the sun’s real-time azimuth and elevation, combined with your window’s facade direction and your actual slat dimensions (width and spacing). The math is based on the standard
Z-profile slat formula.

Key features:

  • Automatic slat angle calculation from sun position
  • Window groups — multiple covers sharing the same facade orientation
  • Manual override detection (“sleep mode”) — won’t disturb blinds you’ve closed manually
  • Reflection protection for glare from balconies/terraces
  • No-sun behaviour configuration (what to do at night or when sun isn’t hitting the facade)
  • Motor throttling to reduce wear
  • Full UI configuration — no YAML needed

Installation:
Custom repository via HACS: GitHub - herpaderpaldent/ha-smart-venetian-blinds: An Adaptive Cover component for HomeAsisstant to control venetian blinds based on the sun's position

Honorable Mentions & Inspiration

A few projects that inspired me or that I’d recommend if Smart Venetian Blinds isn’t the right fit for your setup:

  • Adaptive Cover — The OG community project for sun-driven cover automation. Unfortunately abandoned. Supports a wide range of cover types and has a large community around it. If you need something battle-tested with broad cover support, start here.
  • Smart Cover Automation by @helgek — A well-crafted integration focused on heat protection: closes covers when the sun shines on a window to keep the house cool, with cloud cover, temperature, and wind/hail protection
    all factored in. Great UI configuration. Highly recommended if heat management is your primary goal.

My integration is deliberately narrower — if you have venetian blinds and care about precise slat angle control to manage light quality rather than just heat, that’s where Smart Venetian Blinds fills a gap.

Happy to answer questions or hear feedback from anyone else running venetian blinds!

2 Likes

Hello, thank you for this work,
How does this integration detect the presence of sunlight on the facade?

The integration does not use any light sensor — it is purely geometric. Here’s how it works:

  1. Sun position — it reads azimuth and elevation from sun.sun.
  2. Horizontal Shadow Angle (HSA) — it computes the angle between the sun’s azimuth and your facade’s configured azimuth. If |HSA| > 90°, the sun is
    geometrically behind the facade and cannot shine through the window → slats stay open (sun_is_behind_facade = True).
  3. Sun below horizon — if elevation ≤ 0°, no calculation is done at all.
  4. Profile angle — when the sun does face the facade, it calculates the vertical shadow angle (omega) using the sun elevation and HSA, then solves
    the exact slat tilt needed to block direct rays given the slat width and spacing you configured.

You can see the code regarding this here: ha-smart-venetian-blinds/custom_components/smart_venetian_blinds/sun/math.py at 8b8ec1d86f9bbc637b96fd30e5b4383c2db95765 · herpaderpaldent/ha-smart-venetian-blinds · GitHub

So “detecting sunlight presence” is entirely based on sun geometry vs. facade orientation — no cloud cover, no lux sensor, no weather API. The
trade-off is it’s always accurate about potential direct sun but won’t back off when it’s overcast. If you want cloud-awareness, you’d need to pair
it with the auto-control switch toggled by an external automation.

[UPDATE — April 2026, v0.6.x]

A few months have passed since the original post, and the integration has grown quite a bit. Here’s what’s new:


New features since February

Exit mode (manual-open detection) If you raise a blind above a configurable position threshold — for example, to step out onto a terrace — the
integration detects this and pauses auto-control for that cover until you lower it again. It complements the existing sleep mode (manual-close
detection) to give you full bidirectional manual override protection.

Obstacle elevation You can now configure a per-cover obstacle elevation angle. If there’s a neighboring building or balcony that blocks the sun
below a certain angle, the integration treats that window like it’s in “no sun” mode — applying your configured no-sun behaviour instead of
calculating a slat angle for a sun ray that can’t actually reach the window.

Minimum tilt floor (min_tilt_percent) A configurable lower bound on how open slats can go. Useful for privacy or if your cover hardware doesn’t
respond well near 0%.

Per-cover angle constraints (min_angle / max_angle) Hard limits on the calculated slat angle regardless of what the geometry produces. Useful for
covers near a wall or with physical tilt limits.

Slat geometry editable from the HA device view Slat width and spacing are now exposed as number entities, so you can tweak them directly from the
HA UI without going back through the config flow.


Behavior diagrams

This was the biggest quality-of-life addition for understanding the integration. All five diagrams below are generated directly from the
integration’s own calculate_slat_angle() function — so they always reflect the actual code, never a hand-drawn simulation.

South-facing facade (winter day) — baseline sun-tracking: Image: Vanilla behaviour

East-facing facade — morning tracking, raises when sun moves behind facade: Image: East facade

Obstacle elevation — neighboring building blocks sun below 10°, cover raises: Image: Obstacle elevation

Sleep / manual-close protection — user closes slats, integration pauses: Image: Sleep protection

Exit mode — user raises cover to step outside, integration pauses: Image: Exit mode


Current full feature list:

  • Automatic slat angle calculation from real-time sun position
  • Window groups — multiple covers sharing the same facade orientation
  • Sleep mode — pauses when user closes slats manually
  • Exit mode — pauses when user raises the cover
  • Obstacle elevation — treats low-sun angles blocked by buildings as “no sun”
  • Reflection protection — prevents glare on balconies/terraces
  • No-sun behaviour — configurable action when sun isn’t hitting the facade (keep, open, close, set to %)
  • Min tilt floor — hard lower bound on slat openness
  • Per-cover angle constraints — min_angle/max_angle bounds
  • Motor throttling — reduces wear with configurable angle threshold + update interval
  • Full UI configuration — no YAML needed
  • Slat geometry editable as HA number entities

Installation: HACS custom repository → GitHub - herpaderpaldent/ha-smart-venetian-blinds: An Adaptive Cover component for HomeAsisstant to control venetian blinds based on the sun's position · GitHub

Happy to answer questions!