Manage cover with sun position (elevation and azimuth)

Hello @Edwin_D
No your are not crazy :wink: measuring is better than predicting. I made this blueprint because I do not want to by device to measure and also because the position of my house did not change in the time. I know wenn the sun is shining in my house and wenn it stop.

Hi there,
Thanks for the clarification. Makes absolute sense in your case!
This said, for those with the ability to read/write possition attribute, it would by far more intuitive for shutters of varying sizes.

In such a situation, the whole faffing about with var also doesn’t seem necessary, since at any given time position can be read from the latest state payload of the shutter, under attribute current_possition.

Finally, just in case someone stumbles upon it and finds it more convenient, here is an overview of how I went about doing it in Node-Red, which felt more intuitive for me.

Thanks! I’ve added the variable now, however it doesn’t work still… I’m probably missing something somewhere, is there anything I can post here so you can point me in the right direction?

Hi there!

Still no luck with this blueprint… I must be missing something.

image

But nothing happens!

I’m confused, can someone help?

First off, excellent work @mougeat. I really like this blueprint!
I’d like to ask if there is a way to add another condition based on season:

For my windows facing east, in summer I want the curtains to close when the sun hits that side and the west side to open. However in winter time I want the opposite. Idea is to help manage temperature in the room. Any thoughts on how I could do that?

I have the season integration added but I have no idea how I could integrate it with your blueprint.

PS, If people feel like this is post hijacking I can create a new topic, it just seemed to close to justify a new topic :yum:

Hello, this is a nice blueprint. I added the following option to it. Because if the windspeed is to high the screens has to go open.

    input_wind_speed:
      name: Wind Speed
      description: Wind speed above ... Screens will open
      default: 40
      selector:
        number:
          min: 0.0
          max: 120.0
          unit_of_measurement: km/h
          step: 1.0
          mode: slider
var_wind_speed: !input input_wind_speed

#Screens omhoog door te veel wind!
  - conditions:
    - condition: template
      value_template: '{{- is_state(''input_boolean.cover_manage_cover_with_sun'',
        ''on'') -}}'
    - condition: template
      value_template: '{{ states(var_e) == ''1'' }}'
    - condition: template
      value_template: '{{ state_attr(weather_service, ''wind_speed'') > var_wind_speed
        }}'
    sequence:
    - data_template:
        entity_id: '{{ cover_e }}'
      service: cover.open_cover
    - condition: template
      value_template: '{{ states(cover_e) == ''open'' }}'
    - data:
        entity_id: '{{ var_e }}'
        value: 0
      service: var.set

2 Likes

HI. my logs showing:
Invalid config for [var]: [cover_NAME_OF_YOUR_COVER] is an invalid option for [var]. Check: var->var->cover_NAME_OF_YOUR_COVER. (See /config/configuration.yaml, line 24).

My config.file

input_boolean:
notify_home:
name: input_boolean.cover_manage_cover_with_sun
icon: mdi:window-shutter-settings

var:#### this is line 24
cover_NAME_OF_YOUR_COVER: cover_jadalnia_fix_mala
friendly_name: “JADALNIA FIX MAŁA CIEŃ”
initial_value :0
icon: mdi:bug

Can anyone help whit this?

Hello I plan to do something similar. How I plan to do it is have two of these blueprints for the two seasons but have a automation that switches the automations on or off based on season.

Hi I’m getting an error trying to import this BP

No valid blueprint found in the topic. Blueprint syntax blocks need to be marked as YAML or no syntax.

In your expample sould be:
var:
cover_jadalnia_fix_mala:
friendly_name: “JADALNIA FIX MAŁA CIEŃ”
initial_value :0
icon: mdi:bug

But in this mode is not runing for me.

If they can explain var config…

I am getting the same error

I love the idea of this blueprint, I’m going to try this later today.
I partially lower and raise several of my Somfy shades during the course of any given day, to block the direct sun from getting in our eyes, but don’t close them all the way.

Would it be possible to update your blueprint to open or close to a certain percentage depending on the azimuth / altitude / weather (clear, cloudy, partially cloudy, etc)?

Thanks for your industry!

It would be more helpful if you could share the nodered JSON.

Hi! is it possible to get the sun value “above and below” ? During winter the sun is very low and shines bright in our windows. i live on the first floor. But during summer the sun is much higher and doesent disturd as much. As of right now i can only choose “above” which makes it hard.

And also one question, if the automation triggers and the cover closes, will it open again if the weather turns to “rainy” for exampel? Can you maybe clarify how the open and closing values work?

Thanks!!

1 Like

Hello @convicte could you share your code for node-red? thanx

@mougeat

I second the idea of “above and below” settings. I have the same issue with 2 west facing french doors. When the sun is between 23 degrees and 5 degrees its blinding. Being able to set a range on elevation just like azimuth would be perfect.

Thanks!

@mougeat

I really would love to correctly install & use this automation, because sun is around the corner and may heat up my house soon. For the shutters I use shelly, that also use the position service.

It’s not running. I have not adjusted anything, only followed the instruction above and used a test-shutter. Below some screens. Can somebday make out the issue here? The sun-entity is for sure installed.

I selected the maximum range for azimuth + elevation just for test reasons:

This is how I define the test-shutter in the YAML:
Definition variable in yaml_2

This is the name of the Shutter also used in the configuration.yaml and variable definition shown above:
Shutter_entitiy name_3

Many thanks !!!

Hi

Very nice idea :slight_smile: I mean, this work which you did because when I sit in front of my PC then sun is shining directly on monitor so manual cover closing is needed…

I totally agree with convicte about using possition instead of time.

Just and idea, but maybe hard to do it - I would imagine that best (but most difficult I guess) would be to controll possition of shutter in a way that depends on temperature, sun will shine only f.e. at window sill. Just this needs to be triggered then every f.e. 15 minutes?

Have also the same issue, that shutter is closed, but not re-opened again :frowning: was anybody able to solve this issue in the meantime ? @sascha005 @omolko

@sirfalo @convicte

My fork of the work from @mougeat using shutter position instead of time.

BW

2 Likes