☀️ Cover Control Automation (CCA) - a comprehensive and highly configurable roller blind blueprint

I have not configured a weather forcast and both items are disabled in the “Cover Tilt Position Settings” area.

I can’t find the attribute “current_tilt_position” ?

Here is the config of one of the blinds.

alias: CCA Mia
description: ""
use_blueprint:
  path: hvorragend/cover_control_automation.yaml
  input:
    blind: cover.ma_rollo
    auto_options:
      - auto_up_enabled
      - auto_down_enabled
      - auto_brightness_enabled
      - auto_ventilate_enabled
      - auto_shading_enabled
    cover_status_helper: input_text.cover_status_mia
    cover_status_options: cover_helper_enabled
    drive_time: 50
    ventilate_position: 10
    shading_position: 5
    time_up_early: "09:00:00"
    time_up_early_non_workday: "09:00:00"
    time_up_late: "09:30:00"
    time_up_late_non_workday: "09:30:00"
    workday_sensor: binary_sensor.workday_sensor
    default_brightness_sensor: sensor.average_brightness_5min
    brightness_up: 1
    brightness_down: 1
    time_down_early: "19:45:00"
    time_down_late: "20:15:00"
    time_down_late_non_workday: "20:15:00"
    sun_elevation_up: 1
    sun_elevation_down: -3
    contact_window_tilted: binary_sensor.turgriff_mia_nicht_zu
    shading_brightness_sensor: sensor.average_brightness_5min
    shading_sun_brightness_end: 20000
    shading_azimuth_start: 45
    shading_azimuth_end: 150
    shading_elevation_min: 0
    shading_temperatur_sensor1: sensor.tado_mia_temperatur
    shading_temperatur_sensor2: sensor.ts_wetter_temperatur
    shading_min_temperatur1: 21
    shading_forecast_type: weather_attributes
    auto_global_condition:
      - condition: numeric_state
        entity_id: sensor.ts_wetter_temperatur
        above: -3
    auto_shading_start_action:
      - action: notify.mobile_app_roman_iphone
        metadata: {}
        data:
          title: shading Mia
          message: aktiv
    position_tolerance: 3
    ignore_after_manual_config: []
    reset_override_config: reset_fixed_time
    shading_min_temperatur2: 16
    time_down_early_non_workday: "19:45:00"
    contact_delay_trigger: 1
    contact_delay_status: 2
    shading_sun_brightness_start: 30000
    check_config: true

Here the brightness value was undershot and this caused the shading to end.

I have exactly the same behavior. Tilt is enabled for me and the attributes are available. I have already removed the weather forecast, but the behavior was the same.

Is there somewhere a documentation about the content of the Cover Status Helper? Or even better someone has a template which evaluates the Helper and reports back the status of the cover (like opened, closed, shaded, ventilated,…). I still have the need for additional external automation moving the cover as well - some of my ideas need to read the status of CCA to do the correct movement and I don’t want to identify the CCA status by reading the open/tilt position from the cover.

Have a wonderful good morning,

and Mr. Outstanding, thank you very much for this Blueprint. I have finally been able to turn my back on FHEM :-).

I use your Blueprint with myself and my parents and the bottom line is that so far there have been no problems, except for my parents’ wishes… but even these can usually be fulfilled.

This is a short experience report. As a beginner, I missed these myself in order to better understand this blueprint. And why keep reinventing the wheel?

At home, I use the RolloTron pure DECT belt winders, controlled via the Fritz!Box, while my parents “unfortunately” use Somfy with the RTS radio protocol.

For both systems, I went back to version 2025.05.04 because the latest version caused problems. Perhaps it would also work with the next versions after 2025.05.04, but for now I need to bring some calm back into the little chaos.
I came back because the ventilation and lockout protection at my home no longer worked properly, and the shading system at my parents’ home also failed. And yes, I know that Somfy RTS doesn’t actually work ;-). The trick is to let the Somfy remote controls gather dust and use “Additional Actions Before Activating Sun Shading” with “my Position” for the shading. The commands are then executed several times, but so far this doesn’t seem to bother my parents or the Somfy roller shutter motors. I can’t check it either, as I’m not on site myself.

Maybe this will help some of you.
Christian

ok, I must have overseen that :flushed:
But here is another point:
Cover is in shading mode, Brightness falls below the lower threshold for approx. 2 min and goes back to a value above the thresshold. The shading is ended, although the " Waiting Time For Sun Shading End" is set to 600 sec. I understand that the brightness has to be below the lower threshold for 600s (in my case), or am I wrong?

Traces:

  1. { "trace": { "last_step": "action/4/choose/4/sequence/0/choose/0/sequenc - Pastebin.com
  2. { "trace": { "last_step": "action/4/default/0/if/condition/0", "run - Pastebin.com
  3. { "trace": { "last_step": "action/4/choose/4/sequence/0/choose/4/sequenc - Pastebin.com
  4. { "trace": { "last_step": "condition/1/conditions/1", "run_id": "77 - Pastebin.com

Check out the description of this automation and you’ll find what you are searching for.

Hey there, thank you for the huge updates. I updated the blueprint from April. A lot comfort was added. However, I noticed, that the 5 minute check for the shading is not working correctly in the morning. The cover remains open for a very long time, even if the conditions are met. The cover opens at 6 am and at 7:30 am, they are still open.

Blueprint
alias: CCA Büro (links)
description: ""
use_blueprint:
  path: hvorragend/cover_control_automation.yaml
  input:
    blind: cover.rollladen_buro_links
    auto_options:
      - auto_up_enabled
      - auto_sun_enabled
      - auto_shading_enabled
    cover_status_options: cover_helper_enabled
    cover_status_helper: input_text.cover_status_helper_buro_links
    drive_time: 40
    workday_sensor: binary_sensor.arbeitstag
    sun_elevation_up: -4.5
    sun_elevation_down: -3.5
    shading_brightness_sensor: sensor.umgebungshelligkeit
    shading_temperatur_sensor1: sensor.klima_buro_temperature
    shading_min_temperatur1: 21
    shading_forecast_sensor: weather.openweathermap
    shading_forecast_temp: 17
    shading_position: 25
    shading_azimuth_start: 60
    shading_azimuth_end: 130
    shading_elevation_min: 2
    shading_elevation_max: 55
    auto_shading_start_action:
      - action: input_text.set_value
        metadata: {}
        data:
          value: sun shading
        target:
          entity_id: input_text.debugger
    auto_shading_end_action:
      - action: input_text.set_value
        metadata: {}
        data:
          value: disable shading
        target:
          entity_id: input_text.debugger
    auto_shading_start_condition:
      - condition: template
        value_template: >-
          {{ state_attr('cover.rollladen_buro_links', 'current_position') > 25
          }}
    auto_up_action:
      - action: input_text.set_value
        metadata: {}
        data:
          value: open
        target:
          entity_id: input_text.debugger
    auto_down_action:
      - action: input_text.set_value
        metadata: {}
        data:
          value: close
        target:
          entity_id: input_text.debugger
    auto_shading_start_action_before:
      - if:
          - condition: template
            value_template: >-
              {{ state_attr('cover.rollladen_buro_links', 'current_position') >
              25 }}
        then:
          - sequence:
              - action: cover.close_cover
                metadata: {}
                data: {}
                target:
                  entity_id: cover.rollladen_buro_links
              - delay:
                  hours: 0
                  minutes: 0
                  seconds: 5
                  milliseconds: 0
          - action: input_text.set_value
            metadata: {}
            data:
              value: before sunshade
            target:
              entity_id: input_text.debugger
    auto_manual_action:
      - action: input_text.set_value
        metadata: {}
        data:
          value: manual override
        target:
          entity_id: input_text.debugger
    auto_override_reset_action:
      - action: input_text.set_value
        metadata: {}
        data:
          value: override reset
        target:
          entity_id: input_text.debugger
    auto_up_condition: []
    is_shading_end_immediate_by_sun_position: true
    check_config: true
    auto_shading_end_condition:
      - condition: numeric_state
        entity_id: sensor.klima_aussen_temperature
        below: 24
    time_down_late: "22:30:00"
    time_down_late_non_workday: "22:30:00"

Trace:

In my opinion a present inhabitant is responsible for closing the cover.
Thinking of it, it is a bit like a “Party Mode” - you don’t want your terrace/patio blinds close while you have a party in the living room either.

Maybe the additional conditions are not so bad after all for that.

But I’ll file another one in the repo, which I think has no workaround yet: Roof window shading - the calculation is a bit more complicated and I am too new to HA to have a suggestion how to do matrix dot product calculation (for the normal vector of the window surface and the sun direction) in these scripts.

Thanks for pointing this out. The helper is indeed well documented. Need now to evaluate how to extract individual state and use it for a condition…

Hi,

what does the option “Enable generic automatic opening/closing of the day in the morning/evening” actually mean?
I haven’t configured anything else except for a CCA Helper. This morning, my test roller shutter did not open automatically. With this setting enabled, when exactly should it have opened? What triggers the timing for opening/closing?

Thanks in advance!

Hello,

Few days ago I started to use this template. Your work, continuous maintenance and user`s support is highly respected.

I tried to understand a stuck pending shading situation which looks like was caused by re-triggering of an already active shading.

As I see the template tries to avoid unnecessary re-triggering but one condition allowed it:

line 3245:

      - or: # Try to avoid starting the shading several times TODO / FIXME
          - and:
              - "{{ not is_cover_tilt_enabled_and_possible }}"
              - "{{ not in_shading_position }}"
          - and:
              - "{{ is_cover_tilt_enabled_and_possible }}"
              - "{{ current_position >= shading_position }}"

Is there a use case for the 2nd “and” condition?
I think it could be removed completely but at least the equality could be removed (ideally with respecting the tolerance).

Is it possible that the shading can open covers that have been closed the whole day?
I have some covers that I open manually, and I only want them to be shaded when I have opened them manually.
Today, during a weekend outside I noticed that those two covers were open. They have been opened at the time shading ends, but they should be closed.
Can this be a bug?

I have to provide a link to the trace because android clipboard doesn’t support this much text