Shutter automation with sun azimuth trigger and contact sensor

Hello.

I got so much knowledge from this community that I want to share something what I did.
Below i present You the way which I made my window shutters fallow sun so it will not be dark in whole home but the sun will not heat up interior of house. IRL with outside shutter this drags temperatures by about 8 degrees.
I know there is probably elegant way of coding it but I did not touched my code since it started working.

Below is not including automation opening and closing shutters on sunrise or sundown since You probably already did it if You have shutters.

Here we go:

For simplifying thinking of automations I have crated adjusted azimuth. In simple words this is compensating what household is calling south and what actual south is You have to get this on Your own by doing some trigonometry on maps and change 27 in value template:

- platform: template
    sensors:
      sun_azimuth:
        friendly_name: "Sun Azimuth"
        unit_of_measurement: 'Ā°'
        value_template: "{{ state_attr('sun.sun', 'azimuth')-27|round(0) }}"

Second thing is tu prepare input boolean that will be responsible for not allowing further automations to run for eg. while watching movies on screen or during winter when we are lacking sun. I made two separate for winter and watching movies but one should be enough.

I did this by adding two input booleans in Config > Helpers.

If you have shutters (dirven by mqtt) on balcony windows and contact snsors You will be interested in adding this kind of automations for each window ( by adjusting topic) . It simply blocks tasmota device for executing orders:

- id: "1601917502766"
  alias: Roleta NG blokada
  description: ""
  trigger:
    - platform: state
      entity_id: binary_sensor.dws_okno_garaz_contact
  condition: []
  action:
    - choose:
        - conditions:
            - condition: state
              entity_id: binary_sensor.dws_okno_garaz_contact
              state: "on"
          sequence:
            - service: mqtt.publish
              data:
                topic: cmnd/roleta/RolNG/Backlog
                payload: ShutterLock1 1
        - conditions:
            - condition: state
              entity_id: binary_sensor.dws_okno_garaz_contact
              state: "off"
          sequence:
            - service: mqtt.publish
              data:
                topic: cmnd/roleta/RolNG/Backlog
                payload: ShutterLock1 0
      default: []
  mode: single
  max_exceeded: silent

Next thing You want to do is to group shutters by ā€œso calledā€/household
cardinal directions since we compensated that in first step. This can be don wherever you have Your cvers configured:

  - platform: group
    name: wschod # east
    entities:
      - cover.rolepw
      - cover.rolelw 
  - platform: group
    name: zachod #west
    entities:
      - cover.roleng 
  - platform: group
    name: polnoc #north
    entities:
      - cover.rolelbw 
  - platform: group
    name: poludnie #south
    entities:
      - cover.rolegos 
      - cover.rolept 
      - cover.rolelt 
      - cover.rolepbw 

Main part: I have divided sun azimuth to diffrent directions and this is what triggers shutters. Shutters that are perpendicular (or almost) to sun rays are closed other one are slightly opened and those which are in shadow are opened.

- alias: Rolety 67,5
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 67
    below: 90
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
      - condition: time
        after: 07:00:00
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 50
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 100
  id: e7ebf041a7c040f6b8d095d140effe65
- alias: Rolety 90
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 90
    below: 112
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
      - condition: time
        after: 07:00:00
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 100
  id: eb9f4ea24be34926932fdf560fff826b
- alias: Rolety 112
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 112
    below: 135
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
      - condition: time
        after: 07:00:00
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 50
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 100
  id: 62b2bd85368d478f8b14d9e025e88cac
- alias: Rolety 135
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 135
    below: 157
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
      - condition: time
        after: 07:00:00
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 20
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 20
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 100
  id: 3dfe039f09df452288639237c8feddbd
- alias: Rolety 157
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 157
    below: 180
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
      - condition: time
        after: 07:00:00
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 50
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 100
  id: 30e049743d9742b6b87f47604bcfa4fe
- alias: Rolety 180
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 180
    below: 202
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
      - condition: time
        after: 07:00:00
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 20
  id: a88c2594c7db4b02a3d4b6a3e6aaf65f
- alias: Rolety 202,5
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 202
    below: 225
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 0
  id: 8d5782e3d02946f3a9b5a08180031bed
- alias: Rolety 225
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 225
    below: 247
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 20
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 20
  id: 74a7ee66e61b4d0388945e5e3034f197
- alias: Rolety 247
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 247
    below: 270
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 20
  id: a4a7ad17b9cd4fbf8c89fed4ae431081
- alias: Rolety 270
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 270
    below: 292
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 0
  id: 8203ca21aff7447ebf305f0a10f9f555
- alias: Rolety 292
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 292
    below: 315
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 0
  id: c709fccb95854e8487ba8b2ee870dd4a
- alias: Rolety 315
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 315
    below: 350
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: state
        entity_id: input_boolean.kino_rolety
        state: "off"
      - condition: state
        entity_id: input_boolean.zima_rolety
        state: "off"
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.polnoc
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.wschod
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.poludnie
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.zachod
        position: 20
  id: ef9be8f176494a4e96afe3853c0943df

If You have some automations that will block above ones by input_booleans you can use this to get them to actual state. This is what I use when I am done watchng movies on projector:

- id: "1591476305397"
  alias: Koniec seansu
  description: ""
  trigger:
    - entity_id: input_boolean.kino
      from: "on"
      platform: state
      to: "off"
  condition: []
  action:
   #bunch of other things happening not related to this topic
    - service: automation.trigger
      data_template:
        entity_id:
          "{% if states('sensor.sun_azimuth') | float >= 45 and states('sensor.sun_azimuth')\
          \ | float < 67 and is_state('sun.sun', 'above_horizon') %} \n  automation.rolety_45\n\
          {% elif states('sensor.sun_azimuth') | float >= 67 and states('sensor.sun_azimuth')\
          \ | float < 90 and is_state('sun.sun', 'above_horizon') %}         \n  automation.rolety_675\t\
          \n{% elif states('sensor.sun_azimuth') | float >= 90 and states('sensor.sun_azimuth')\
          \ | float < 112 and is_state('sun.sun', 'above_horizon') %} \n  automation.rolety_90\t\
          \n{% elif states('sensor.sun_azimuth') | float >= 112 and states('sensor.sun_azimuth')\
          \ | float < 135 and is_state('sun.sun', 'above_horizon') %} \n  automation.rolety_112\t\
          \n{% elif states('sensor.sun_azimuth') | float >= 135 and states('sensor.sun_azimuth')\
          \ | float < 157 and is_state('sun.sun', 'above_horizon') %} \n  automation.rolety_135\t\
          \n{% elif states('sensor.sun_azimuth') | float >= 157 and states('sensor.sun_azimuth')\
          \ | float < 180 and is_state('sun.sun', 'above_horizon') %}             \n\
          \  automation.rolety_157\t\n{% elif states('sensor.sun_azimuth') | float >=\
          \ 180 and states('sensor.sun_azimuth') | float < 202 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_180\t\n{% elif states('sensor.sun_azimuth')\
          \ | float >= 202 and states('sensor.sun_azimuth') | float < 225 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_2025\t\n{% elif states('sensor.sun_azimuth')\
          \ | float >= 225 and states('sensor.sun_azimuth') | float < 247 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_225\t\n{% elif states('sensor.sun_azimuth')\
          \ | float >= 247 and states('sensor.sun_azimuth') | float < 270 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_247\t\n{% elif states('sensor.sun_azimuth')\
          \ | float >= 270 and states('sensor.sun_azimuth') | float < 292 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_270\t\n{% elif states('sensor.sun_azimuth')\
          \ | float >= 292 and states('sensor.sun_azimuth') | float < 315 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_292\t\n{% elif states('sensor.sun_azimuth')\
          \ | float >= 315 and states('sensor.sun_azimuth') | float < 350 and is_state('sun.sun',\
          \ 'above_horizon') %} \n  automation.rolety_315\t\n{% else %} \n  automation.rolety_zamkniecie_zachod\n\
          {% endif %} \n"

Well it is pretty much all of You hope It will be usefull and let me know that do You think about it.

5 Likes

Hi
at first thx for this i hope it will work for me and iam searching for this. but before i start i have 1 question, on what time of the day did you read your sun azimuth from 27? because it change the whole day.

To make simple what i was trying to describe take a look at that:


It is constans.
You don`t have to wait for any specific hour to calculate that. I think even simple school protractor used with PC screen should do the work.

ahh ok now i know what you mean, thx

Thank you very much to share. Iā€™ve copy/paste ā€˜the main partā€™ and Iā€™m happy with the result. Thanks!

1 Like

today i tried your automation and it works realy nice, thx for this

1 Like

Wouldnt it be nice if the locking of the shutter is integrated in the cover model (entity) so you just need to execute something like cover.lock() and cover.unlock()?

I have allready created a Feature Request on this, so if you also like the idea maybe you can support the request so that we can get the ā€œcritical massā€ to get it implemented :smiley:

Sorry, I have left Ha for some time.
I did upvote Your Feature Request.

Love this, where did you move to?

1 Like

I have a question for all who got it running:
Where do i put the following?

  - platform: template
    sensors:
      sun_azimuth:
        friendly_name: "Sun Azimuth"
        unit_of_measurement: "Ā°"
        value_template: "{{ state_attr('sun.sun', 'azimuth')-10|round(0) }}"

No matter where I put it (configuration.yaml or automations.yaml) i get synthax errorsā€¦
I may be to stupid to do thisā€¦ :frowning:
Any help i really apprechiated.

@Zeze21 You need to add it to your configuration.yaml under a ā€œsensor:ā€ tag. If you do not have a sensor tag in the file simply add one.

sensor:
  - platform: template
    sensors:
      sun_azimuth:
        friendly_name: 'Sun Azimuth'
        unit_of_measurement: 'Ā°'
        value_template: "{{ state_attr('sun.sun', 'azimuth')-10|round(0) }}"
1 Like

Nice project! I achieved something similar with an Aqara Light Sensor on my balcony so the shutters donā€™t close on cloudy days

1 Like

Nice to hear that when sun is a little more offensive this topic is gaining some attention.

Thank You. Well I meant that I was just away from tweaking my HA. I have not moved to OpenHAB or any other ā€œblaspemyā€

Thank You. Well I am just testing (more like postponing this for 2 months) this modification:

condition:
    condition: and
    conditions:
    - condition: state
      entity_id: sun.sun
      state: above_horizon
    - condition: state
      entity_id: input_boolean.kino_rolety
      state: 'off'
    - condition: state
      entity_id: input_boolean.zima_rolety
      state: 'off'
    - condition: time
      after: 07:00:00
    - condition: or
      conditions:
      - condition: state
        entity_id: weather.dom
        state: sunny
      - condition: state
        entity_id: weather.dom
        state: partlycloudy

So if shutters wont do this if there is bad weather and You just want more light.

PS. Iff You will use part with blocking shutters when window is opened consider placing that sensor at top of Your window. I have two for every ā€œbalcony windowā€ top one blocks ventilation bottom blocks shutter. Other windows just have top one.

So Ever since this started a lot of things happened in the world:

  1. i had this running for about a year and noticed some things i wanted to change: I didnā€™t want my covers to close during winter. I wanted the option to add a temperature offset to the settings.
  2. some guys made AI available for the public - so i thought - maybe we can shorten all thisā€¦

Here is what chat gtp came up with:

- alias: Rolety
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 67
    below: 315
  condition:
    - condition: and
      conditions:
        - condition: state
          entity_id: sun.sun
          state: above_horizon
        - condition: time
          after: '06:00:00'
        - condition: template
          value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
        - condition: or
          conditions:
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: sunny
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: partlycloudy
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: cloudy
            - condition: numeric_state
              entity_id: sensor.openweathermap_temperature
              above: 20
  action:
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_nord
        position: "{{ 100 if (67 <= state.sensor.sun_azimuth < 90 or 112 <= state.sensor.sun_azimuth < 135 or 157 <= state.sensor.sun_azimuth < 180 or 202 <= state.sensor.sun_azimuth < 225 or 270 <= state.sensor.sun_azimuth < 292) else 50 }}"
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_ost
        position: "{{ 0 if (90 <= state.sensor.sun_azimuth < 135 or 157 <= state.sensor.sun_azimuth < 180 or 202 <= state.sensor.sun_azimuth < 247 or 292 <= state.sensor.sun_azimuth < 315) else 100 }}"
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_sud
        position: "{{ 0 if (135 <= state.sensor.sun_azimuth < 157 or 180 <= state.sensor.sun_azimuth < 202 or 225 <= state.sensor.sun_azimuth < 247 or 315 <= state.sensor.sun_azimuth < 337) else 100 }}"
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_west
        position: "{{ 0 if (247 <= state.sensor.sun_azimuth < 270 or 292 <= state.sensor.sun_azimuth < 315) else 100 }}"

TBH i havenā€™t tested this myself yet but i will tomorrow - if it works, i will let you guys know

Well that didnā€™t quite work as planned (it did not work at all)

I donā€™t really understand where my mistake is
This is in my configuration.yaml:


cover:
  - platform: group
    name: rollos_ost # east
    entities:
      - cover.rollo_kinderzimmer_ost
      - cover.rollo_schlafzimmer_ost
      - cover.rollo_wohnzimmer_ost
      - cover.rollo_wohnzimmer_garage
  - platform: group
    name: rollos_nord #north
    entities:
      - cover.rollo_badezimmer
      - cover.rollo_schlafzimmer_nord
      - cover.rollo_wc_eg
      - cover.rollo_kuche
  - platform: group
    name: rollos_sud #south
    entities:
      - cover.rollo_kinderzimmer_sudost
      - cover.rollo_kinderzimmer_west
      - cover.rollo_wohnzimmer_sudost
      - cover.rollo_wohnzimmer_west

sensor:
  - platform: template
    sensors:
      sun_azimuth:
        friendly_name: "Sun Azimuth"
        unit_of_measurement: "Ā°"
        value_template: "{{ state_attr('sun.sun', 'azimuth')-10|round(0) }}"

and this (or the above one) in my automations.yaml

- alias: Rolety 67,5
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 67
    below: 90
  condition:
    - condition: and
      conditions:
        - condition: state
          entity_id: sun.sun
          state: above_horizon
        - condition: time
          after: 06:00:00
        - condition: template
          value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
        - condition: or
          conditions:
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: sunny
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: partlycloudy
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: cloudy
            - condition: numeric_state
              entity_id: sensor.openweathermap_temperature
              above: 20
  action:
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_nord
        position: 50
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_ost
        position: 0
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_sud
        position: 100
    - service: cover.set_cover_position
      data:
        entity_id: cover.rollos_west
        position: 100

  id: e7ebf041a7c040f6b8d095d140effe65
- alias: Rolety 90
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 90
    below: 112
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: time
        after: 06:00:00
      - condition: template
        value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
      - condition: or
        conditions:
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: sunny
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: partlycloudy
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: cloudy
          - condition: numeric_state
            entity_id: sensor.openweathermap_temperature
            above: 20
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 100
- id: 62b2bd85368d478f8b14d9e025e88cac
  alias: Rolety 112
  trigger:
    - platform: numeric_state
      entity_id: sensor.sun_azimuth
      above: 112
      below: 135
  condition:
    - condition: and
      conditions:
        - condition: state
          entity_id: sun.sun
          state: above_horizon
        - condition: time
          after: 06:00:00
        - condition: template
          value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
        - condition: or
          conditions:
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: sunny
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: partlycloudy
            - condition: state
              entity_id: sensor.openweathermap_condition
              state: cloudy
            - condition: numeric_state
              entity_id: sensor.openweathermap_temperature
              above: 20
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 50
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 100
- alias: Rolety 135
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 135
    below: 157
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: time
        after: 06:00:00
      - condition: template
        value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
      - condition: or
        conditions:
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: sunny
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: partlycloudy
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: cloudy
          - condition: numeric_state
            entity_id: sensor.openweathermap_temperature
            above: 20
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 20
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 20
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 100
  id: 3dfe039f09df452288639237c8feddbd
- alias: Rolety 157
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 157
    below: 180
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: time
        after: 06:00:00
      - condition: template
        value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
      - condition: or
        conditions:
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: sunny
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: partlycloudy
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: partlycloudy
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: cloudy
          - condition: numeric_state
            entity_id: sensor.openweathermap_temperature
            above: 20
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 50
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 100
  id: 30e049743d9742b6b87f47604bcfa4fe
- alias: Rolety 180
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 180
    below: 202
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
      - condition: time
        after: 06:00:00
      - condition: template
        value_template: "{{ now().strftime('%m-%d') >= '03-10' and now().strftime('%m-%d') <= '10-20' }}"
      - condition: or
        conditions:
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: sunny
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: partlycloudy
          - condition: state
            entity_id: sensor.openweathermap_condition
            state: cloudy
          - condition: numeric_state
            entity_id: sensor.openweathermap_temperature
            above: 20
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 20
  id: a88c2594c7db4b02a3d4b6a3e6aaf65f
- alias: Rolety 202,5
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 202
    below: 225
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 0
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 0
  id: 8d5782e3d02946f3a9b5a08180031bed
- alias: Rolety 225
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 225
    below: 247
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 20
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 20
  id: 74a7ee66e61b4d0388945e5e3034f197
- alias: Rolety 247
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 247
    below: 270
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 20
  id: a4a7ad17b9cd4fbf8c89fed4ae431081
- alias: Rolety 270
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 270
    below: 292
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 0
  id: 8203ca21aff7447ebf305f0a10f9f555
- alias: Rolety 292
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 292
    below: 315
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 0
  id: c709fccb95854e8487ba8b2ee870dd4a
- alias: Rolety 315
  trigger:
    platform: numeric_state
    entity_id: sensor.sun_azimuth
    above: 315
    below: 350
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: sun.sun
        state: above_horizon
  action:
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_nord
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_ost
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_sud
        position: 100
    - service: COVER.SET_COVER_POSITION
      data:
        entity_id: cover.rollos_west
        position: 20

But nothing happens ā†’ even if i try to start the automations manually nothing happensā€¦ I am at a lossā€¦