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

Hi @Herr.Vorragend - final comment on my issue: the shading on my Shelly configuration was just not working due to a wrong setup of a ColoT-configuration in my setup - so quite dumb, but was just today (after weeks) finding out … thanks for your patience.

Wont spam anymore this thread with traces :innocent: Never expected this issue so deep in my config. Many thanks for your patience - now I can finally & happily try out the shading function.

1 Like

What is the best way to set up an away/vacation mode? I have a boolean that is set to “true” whenever no one is at home. In Node-Red, I use this boolean to close the window covers immediately, and when someone returns, it opens them to their designated position if the sun is still up. It seems like “Resident Mode” would pretty much do this. Except it seems like if the time is outside the parameters for drive up, it won’t open. Going to test with it more tomorrow.

Hello, since the Blueprint was updated to the current version, the roller shutters are no longer shut down for shading. Before it worked flawlessly. Unfortunately I don’t remember the version it worked with, I think it was from the beginning of the year.

The lux value was over 8000 lux for more than 30 seconds and the azimuth was over 210 and the elevation was also between 20 and 90.

alias: ES_Ro_Fest_Links
description: ""
use_blueprint:
  path: hvorragend/cover_control_automation.yaml
  input:
    blind: cover.hmipw_drbl4_00165f29980809_ch2
    auto_options:
      - auto_shading_enabled
    default_brightness_sensor: sensor.raspberry_sv_wm_lux
    sun_elevation_up: 90
    workday_sensor: binary_sensor.workday_sensor
    shading_brightness_sensor: sensor.raspberry_sv_wm_lux
    shading_position: 70
    shading_sun_brightness_start: 5000
    shading_sun_brightness_end: 2000
    shading_azimuth_start: 0
    shading_azimuth_end: 365
    shading_elevation_min: -90
    shading_temperatur_sensor1: sensor.raspberry_sv_wm_temperatur
    shading_min_temperatur1: 0
    shading_waitingtime_start: 30
    shading_waitingtime_end: 120
    check_config: false
    sun_time_duration: 20
    sun_elevation_down: 90
    shading_forecast_temp: 0
    shading_min_temperatur2: 0
    auto_shading_end_condition: []
    time_up_early: "05:00:00"
    brightness_time_duration: 30
    brightness_up: 5
    time_up_early_non_workday: "07:00:00"
    time_down_late: "22:00:00"
    time_down_late_non_workday: "23:00:00"
    time_up_late: "05:00:00"
    time_up_late_non_workday: "07:00:00"
    time_down_early: "22:00:00"
    time_down_early_non_workday: "23:00:00"
    close_position: 20
    shading_elevation_max: 90
    cover_status_options: cover_helper_disabled
    time_control: time_control_disabled
    shading_tilt_position: 51

this:
  entity_id: automation.es_fest_links_ro
  state: 'on'
  attributes:
    id: '1707826811178'
    last_triggered: '2024-06-04T10:47:05.938854+00:00'
    mode: restart
    current: 0
    friendly_name: ES_Ro_Fest_Links
  last_changed: '2024-06-04T10:14:29.549174+00:00'
  last_reported: '2024-06-04T10:47:05.945817+00:00'
  last_updated: '2024-06-04T10:47:05.945817+00:00'
  context:
    id: 01HZHDR5YFA0B50RT0CPKAK8N5
    parent_id: 01HZHDQ8MVMQR5CP5M581E9F32
    user_id: null
trigger:
  platform: template
  entity_id: sensor.raspberry_sv_wm_lux
  from_state:
    entity_id: sensor.raspberry_sv_wm_lux
    state: '5000'
    attributes:
      state_class: measurement
      name: wm_lux
      unit_of_measurement: lux
      friendly_name: Raspberry Sv_wm_lux
    last_changed: '2024-06-04T10:48:41.958185+00:00'
    last_reported: '2024-06-04T10:48:41.958185+00:00'
    last_updated: '2024-06-04T10:48:41.958185+00:00'
    context:
      id: 01HZHDV3Q6SRBTHV6RQT2CNP6R
      parent_id: null
      user_id: bb4fdfe58daf469092ec576e4266f6f4
  to_state:
    entity_id: sensor.raspberry_sv_wm_lux
    state: '8903.2'
    attributes:
      state_class: measurement
      name: wm_lux
      unit_of_measurement: lux
      friendly_name: Raspberry Sv_wm_lux
    last_changed: '2024-06-04T10:49:05.930194+00:00'
    last_reported: '2024-06-04T10:49:05.930194+00:00'
    last_updated: '2024-06-04T10:49:05.930194+00:00'
    context:
      id: 01HZHDVV4AEFYNV6HVNWS8D23Y
      parent_id: null
      user_id: null
  id: t_si_1
  idx: '18'
  alias: null
  for:
    __type: <class 'datetime.timedelta'>
    total_seconds: 30
  description: sensor.raspberry_sv_wm_lux via template
blind: cover.hmipw_drbl4_00165f29980809_ch2
open_position: 100
close_position: 20
shading_position: 70
position_tolerance: 0
auto_options:
  - auto_shading_enabled
time_up_early: '05:00:00'
time_up_early_non_workday: '07:00:00'
time_up_late: '05:00:00'
time_up_late_non_workday: '07:00:00'
time_down_early: '22:00:00'
time_down_early_non_workday: '23:00:00'
time_down_late: '22:00:00'
time_down_late_non_workday: '23:00:00'
workday_sensor: binary_sensor.workday_sensor
default_brightness_sensor: sensor.raspberry_sv_wm_lux
brightness_up: 5
brightness_down: 0
default_sun_sensor: sun.sun
sun_elevation_up: 90
sun_elevation_down: 90
contact_sensor: []
contact_sensor_lockout: []
resident_sensor: []
time_control: time_control_disabled
time_schedule_helper: []
shading_brightness_sensor: sensor.raspberry_sv_wm_lux
shading_temperatur_sensor1: sensor.raspberry_sv_wm_temperatur
shading_temperatur_sensor2: []
shading_min_temperatur1: 0
shading_min_temperatur2: 0
shading_azimuth_start: 0
shading_azimuth_end: 365
shading_elevation_min: -90
shading_elevation_max: 90
shading_sun_brightness_start: 5000
shading_sun_brightness_end: 2000
shading_forecast_temp: 0
shading_forecast_sensor: []
shading_weather_conditions:
  - sunny
  - partlycloudy
  - cloudy
  - clear
is_shading_enabled: true
is_up_enabled: false
is_down_enabled: false
is_brightness_enabled: false
is_sun_elevation_enabled: false
is_ventilation_enabled: false
is_lockout_protection_enabled: false
is_time_field_enabled: true
is_schedule_helper_enabled: false
is_time_control_disabled: true
version: 2024.05.28-01
blind_entities:
  - cover.hmipw_drbl4_00165f29980809_ch2
current_position: 100
current_sun_azimuth: 159.48
current_sun_elevation: 59.96
drive_delay_fix: 0
drive_delay_random: 5
drive_time: 90
time_up_early_today: '05:00:00'
time_up_late_today: '05:00:00'
time_down_early_today: '22:00:00'
time_down_late_today: '22:00:00'
open_tilt_position: 51
close_tilt_position: 50
ventilate_position: 30
ventilate_tilt_position: 50
auto_up_force: []
auto_down_force: []
auto_ventilate_force: []
auto_shading_start_force: []
shading_tilt_position: 51
check_config: false
check_config_debuglevel: info
cover_status_options: cover_helper_disabled
cover_status_helper: []
is_status_helper_enabled: false
is_cover_open: false
is_cover_open_ts: 0
is_cover_closed: false
is_cover_closed_ts: 0
is_cover_ventilated: false
is_cover_ventilated_ts: 0
is_cover_shaded: false
is_cover_shaded_ts: 0
is_cover_locked: false
is_cover_locked_ts: 0
is_cover_manual: false
is_cover_manual_ts: 0
cover_status_time: false
in_open_position: true
in_close_position: false
in_shading_position: false
in_ventilate_position: false
individual_config: []
prevent_close_after_lockout: false
prevent_higher_position_closing: false
prevent_higher_position_shading_end: false
prevent_forecast_service: false
prevent_shading_end_if_closed: false
prevent_default_cover_actions: false
prevent_shading_multiple_times: false
prevent_opening_multiple_times: false
prevent_closing_multiple_times: false
prevent_closing_by_resident: false
ignore_after_manual_config: []
ignore_opening_after_manual: false
ignore_closing_after_manual: false
ignore_ventilation_after_manual: false
ignore_shading_after_manual: false
auto_ventilate_options: []
ventilation_delay_enabled: false
ventilation_if_lower_enabled: false
platform: template
value_template: |-
  {{
    is_shading_enabled and
    default_sun_sensor != [] and
    state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_start) > shading_azimuth_start and
    state_attr(default_sun_sensor, 'azimuth') | float(default=shading_azimuth_end) < shading_azimuth_end and
    state_attr(default_sun_sensor, 'elevation') | float(default=shading_elevation_min) > shading_elevation_min and
    (shading_brightness_sensor == [] or states(shading_brightness_sensor) | float(default=shading_sun_brightness_start) > shading_sun_brightness_start) and
    (shading_temperatur_sensor1 == [] or states(shading_temperatur_sensor1) | float(default=shading_min_temperatur1) > shading_min_temperatur1) and
    (shading_temperatur_sensor2 == [] or states(shading_temperatur_sensor2) | float(default=shading_min_temperatur2) > shading_min_temperatur2) and
    (shading_forecast_sensor == [] or shading_weather_conditions == [] or states(shading_forecast_sensor) in shading_weather_conditions)
  }}
for:
  seconds: 30
id: t_si_1

Please read the changelog and the breaking change note:
You have to configure a Cover Status Helper.

New Update (HA Core v2024.6.0 required!)

2024.06.04-01:
  - Major GUI Update: Using blueprint sections now (Min-Core-Version: 2024.6.0)

It is finally possible to bring a little order into the blueprint. I had previously tried to make the areas recognisable using the emojis. But with the new core version, we now have collapsible sections. This has also led me to fundamentally tidy up the various configuration options. The new core version will be released on 5 June.

5 Likes

@Herr.Vorragend I have the following problem with ventilation/shading.
The window is closed and my roller blind is set to 35% sun protection. When I tilt the window afterwards, the roller blind moves to 20% in ventilation mode although it should remain at 35%. The 20% is sufficient for ventilation in the evening when the roller blind should be closed.

alias: Shuttercontrol - OG_2_F1
description: ""
use_blueprint:
  path: hvorragend/cover_control_automation.yaml
  input:
    blind: cover.og_2_f1_rollo
    auto_options:
      - auto_up_enabled
      - auto_down_enabled
      - auto_brightness_enabled
      - auto_ventilate_enabled
      - auto_shading_enabled
      - auto_sun_enabled
    cover_status_options: cover_helper_enabled
    cover_status_helper: input_text.shutter_status_og_2_f1
    time_down_late: "20:00:00"
    time_down_late_non_workday: "20:00:00"
    default_brightness_sensor: sensor.ms_garagentur_illuminance
    brightness_up: 45
    brightness_down: 42
    position_tolerance: 2
    workday_sensor: binary_sensor.workday_sensor
    contact_sensor: binary_sensor.shutter_status_og_2_f1_griff_gekippt
    time_up_early: "05:30:00"
    time_up_early_non_workday: "08:00:00"
    ventilate_position: 20
    auto_ventilate_options:
      - ventilation_if_lower_enabled
    shading_azimuth_end: 248
    shading_azimuth_start: 128
    shading_temperatur_sensor1: sensor.weatherman_sonnen_temperatur_gleitend
    shading_min_temperatur1: 33
    shading_waitingtime_end: 900
    shading_waitingtime_start: 60
    individual_config:
      - prevent_shading_end_if_closed
      - allow_shading_multiple_times
    sun_elevation_up: 0
    sun_elevation_down: -1
    shading_position: 35
    auto_shading_start_force: input_boolean.shutter_switch_shading_richtung_s
    auto_shading_end_condition:
      - condition: template
        value_template: false
    contact_sensor_lockout: binary_sensor.shutter_status_og_2_f1_griff_offen

Helper (1)

{"open":{"a":true,"t":1717495489},"close":{"a":false,"t":1717437604},"ventilate":{"a":true,"t":1717503999},"shading":{"a":true,"t":1717495489},"locked":{"a":false,"t":0},"manual":{"a":false,"t":1717324866},"p":35,"v":4,"t":1717503999}

Helper (2)

{"open":{"a":true,"t":1717495489},"close":{"a":false,"t":1717437604},"ventilate":{"a":true,"t":1717503999},"shading":{"a":true,"t":1717495489},"locked":{"a":false,"t":0},"manual":{"a":false,"t":1717324866},"p":35,"v":4,"t":1717503999}

Is it possible to configure it so that the roller blind only moves to the position for ventilation when the roller blind is already closed?

Try removing this:

auto_ventilate_options:
      - ventilation_if_lower_enabled
1 Like

crandler is right. Because you activated this option, the blind was lowered during ventilation.

This does not currently exist. But you are welcome to create this as an issue in GitHub.

Ventilation is currently always performed when the roller blind is lowered. This means when sun shading is active, etc.

1 Like

I’m waiting for the release tonight.
You can expect the following after the blueprint update.

IMG_3052

2 Likes

New Update:

2024.06.05-01:
  - Added: Optional checking workday tomorrow sensor when closing the cover #71
  - Updated: GUI section icons to MDI icons

New feature

Sensor For Workday Tomorrow (only for closing)

When closing the blinds, you have the option of checking the times for tomorrow rather than the current day. This has the advantage that you can close the blinds earlier if tomorrow is a working day. This makes sense if, for example, there is school tomorrow but today is actually still the weekend. But the child has to go to bed earlier.
If this field is not configured here, the normal working day sensor is used.

2 Likes

@Herr.Vorragend : I have a problem with the shading function of CCA and I cannot fugure out why it is caused: my covers on the western side of my house close completely (instead of the selected 45%) and do not open any more at all. The problem of closing completely appearts only when I select - allow_shading_multiple_times.
Can it be connected to the position in accuracy? When going into shading mode the first time my cover position says 48% instead of 45%.
Shading out should happen if ONE of the conditions (azimuth, brightness, elevation, …) is not met any more, right?
This is my configuration:


 alias: CCA Wohnzimmer West
 description: ""
 trace:
   stored_traces: 20
 use_blueprint:
   path: hvorragend/cover_control_automation.yaml
   input:
     blind: cover.eltako_gw1_00_00_00_03
     auto_options:
       - auto_up_enabled
       - auto_down_enabled
       - auto_sun_enabled
       - auto_shading_enabled
       - auto_brightness_enabled
     drive_time: 30
     time_up_late: "08:30:00"
     time_up_late_non_workday: "09:00:00"
     time_down_early: "15:30:00"
     time_down_early_non_workday: "15:30:00"
     default_brightness_sensor: sensor.eltako_gw1_05_8d_9f_e1_weather_station_illuminance_dawn
     brightness_up: 950
     brightness_down: 75
     sun_elevation_up: 5
     sun_elevation_down: -5
     shading_position: 45
     shading_brightness_sensor: sensor.eltako_gw1_05_8d_9f_e1_weather_station_illuminance_central
     shading_sun_brightness_start: 25000
     shading_sun_brightness_end: 15000
     shading_azimuth_start: 211
     shading_azimuth_end: 360
     shading_elevation_min: 10
     shading_elevation_max: 100
     shading_min_temperatur1: 22
     shading_temperatur_sensor1: sensor.proxon_ist_temperatur_wohnzimmer
     cover_status_options: cover_helper_enabled
     cover_status_helper: input_text.rolladen_postionsstatus_wohnzimmer_west
     auto_global_condition:
       - condition: state
         entity_id: input_boolean.rollladenautomatik
         state: "on"
     workday_sensor: binary_sensor.workday_sensor
     drive_delay_random: 0
     auto_shading_start_condition:
       - condition: state
         entity_id: input_boolean.beschattungsautomatik
         state: "on"
     check_config: false
     individual_config:
       - allow_shading_multiple_times
     check_config_debuglevel: info
     brightness_time_duration: 30
     sun_time_duration: 30
     shading_waitingtime_start: 300
     shading_waitingtime_end: 300

My cover status helper looks like this, can it be correct?

{“open”:{“a”:false,“t”:1717616006},“close”:{“a”:true,“t”:1717616178},“ventilate”:{“a”:false,“t”:0},“shading”:{“a”:false,“t”:1717602736},“locked”:{“a”:false,“t”:0},“manual”:{“a”:false,“t”:1717616006},“p”:100,“v”:4,“t”:1717616178}

And the trace:

https://pastebin.com/kyxncK43

I need a trace to diagnose what caused this. The trace above has nothing to do with this and unfortunately says nothing.

This should be the right one, sorry:

I don’t quite understand that.
In the second trace, I can see that the roller blind is already at position 0. This is why the retriggered action is canceled.
I think you’ve sent me the wrong trace again.

Your problem is with the closing of the shading, isn’t it? Not during the closing process.

Yes, this could of course be due to the incorrect position. But that’s what position tolerance is for.

And yes, shading is ended if one of the conditions becomes negative.

Hi!

First of all, great work on this blueprint. I have the following question:
I would like the shades to open automatically when it is going to rain (to prevent them getting wet). I have the following sensor:

It has the attribute precip, which shows values >0 for when it is going to rain. Each entry is further in time. E.g. the first one is now, the second in 5 minutes, third in 10 minutes etc. I would like to build a condition which opens the shades when it is going to rain (second or third has a value >0). Do you have any suggestions on how to achieve this?

So two alreday that do not understand… :wink:
Okay, I will try a position tolerance of 2, that might solve the issue.
Does the position helper format look correct to you? It looks so different from the example in post #636
I will check if the problem reappears with the new settings and send you another trace if it is still happening.

BTW: the groups in your latest version are great!

I ma getting an error on preview


Nay idea?

thanks!

Yes, you have to update your core version.
Just see my posts above.

Yes, you can use the force function.
That’s exactly why I built it in.

Shouldn’t that be 3?

I didn’t notice anything unusual.
However, this is also difficult to judge if I can’t see the progress over time.
But I always see the results of the helper in the trace. So don’t concentrate too much on the contents of the helper.