🌞 Automatic blinds / sunscreen control based on sun platform

Hi :slight_smile:

I came up with a template sensor that calculates the optimal sunscreen height so that you can automatically control your blinds based on the sun’s position in the sky. :sun_with_face:

It uses trigonometry to regulate the amount of natural light while keeping the blinds low enough to block the sun from hitting your eyes.

@basbrus made a very nice blueprint which automates everything for you.

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

All the technical details and a detailed explanation of how it works can be found in this post:
Automatic blinds / sunscreen control based on sun platform

Let me know what you think!

6 Likes

There should be an option to set the minimum position of the blind. e.g. 30%

This is added now

1 Like

Hi all,
I’m a new blueprint “sunscreen control based…”, user and I’ve installed yesterday this blue print.
My sunscreen cover are in the both side of my flat. Today the first test appear great, thanks to @langestefan blueprint. My problem is regarding wind. In the last week we have experienced wind of 15 m/sec, or 50km/h. I don’t know if is possible to add a "wind " control to raise the awning based on my wind sensor.
Thank you.
Leo

You can write your own automation that will override control of the blueprint. There are some examples in the main thread which I linked above. Ps you can also use the adaptive cover integration now, it has much more features: GitHub - basbruss/adaptive-cover: An Adaptive Cover component for HomeAsisstant to control covers based on the sun's position

1 Like

Hi @langestefan,
I need to integrate also wind control for my awning safety.
I’m learning now how to write my automation using templating and so on.
Thank you.
Leo

The blueprint is not really build for awnings, but only for vertical positioned type of blinds/covers.

The integration built by me and mentioned by @langestefan has additional code for horizontal positioned blinds (awnings).

No need to use templating within an automation to control for windspeeds

trigger:
  - id: wind_high
    platform: numeric_state
    above: 12 #m/s
    entity_id: sensor.wind_speed
  - id: wind_safe
    platform: numeric_state
    below: 12 #m/s
    entity_id: sensor.wind_speed
action:
  - choose:
      - conditions:
          - condition: trigger
            id: "wind_high"
        sequence:
          - service: automation.turn_off
            metadata: {}
            data:
              stop_actions: true
            target:
              entity_id: automation.blueprint_sunblind
          - service: cover.open_cover
            target:
              entity_id: cover.awning
      - conditions:
          - condition: trigger
            id: "wind_safe"
        sequence:
          - service: automation.turn_on
            metadata: {}
            target:
              entity_id: automation.blueprint_sunblind

Or if you use the integration change the service calls for the automation to switch calls targeting the control toggle switch

2 Likes

Hi @basbrus,
I think that also I must full open the awnings, btw I learn how to!
Thank you
Leo

This part of the automation already opens the cover fully when the windspeed is to high :wink:

1 Like

@basbrus @langestefan

It’s working! Tomorrow next test, I’ve two awing at 180° (est/west).
Thank you!

IMHO I think that I must put a “timer” after “wind_high” to prevent awning flapping!

Done!

Could you simplify the blueprint in a way that would allow for someone with no automatic blinds to use it?
The idea is I get a notification to raise my blinds once the sun doesn’t shine through my window anymore.

No need to simplify the blueprint. You can just to that with the most basic automation. You only need to know the azimuth when the sun doesn’t shine through your window.

description: ""
mode: single
trigger:
  - platform: numeric_state
    entity_id:
      - sun.sun
    attribute: azimuth
    above: 180
condition: []
action:
  - service: notify.send_message
    metadata: {}
    data: {}

So this automation can send a notifcation when the suns azimuth is above 180 for example.

1 Like

Is the Azimuth for when that happens going to change throughout the sunny months of the year?

No it’s an absolute compass value, unless the elevation 0 is below you can consider to open it earlier. For that you can add a trigger for the elevation attribute below 1. If you are in the Northern hemisphere this only holds for North-west oriented windows

unless the elevation 0 is below you can consider to open it earlier. For that you can add a trigger for the elevation attribute below 1.

No idea what you mean by any of that.

If you are in the Northern hemisphere this only holds for North-west oriented windows

I’m in the Northern Hemisphere and my window faces to the South-East. So, what do I do now?