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

… another error

Logger: homeassistant.components.automation.shuttercontrol_bad_eg_f1
Quelle: helpers/script.py:2067
Integration: Automation (Dokumentation, Probleme)
Erstmals aufgetreten: 9. Juni 2025 um 21:37:02 (8 Vorkommnisse)
Zuletzt protokolliert: 05:00:04

Shuttercontrol - Fenster Bad_EG_F1: Choose at step 4: Check for closing cover: Error executing script. Error for choose at pos 1: Error rendering data template: UndefinedError: 'state' is undefined
Shuttercontrol - Fenster Bad_EG_F1: Error executing script. Error for choose at pos 4: Error rendering data template: UndefinedError: 'state' is undefined
Shuttercontrol - Fenster Bad_EG_F1: Choose at step 4: Check for opening: Choose at step 2: Normal opening of the cover: Choose at step 4: default: Error executing script. Error for call_service at pos 2: Error rendering data template: UndefinedError: 'state' is undefined
Shuttercontrol - Fenster Bad_EG_F1: Choose at step 4: Check for opening: Choose at step 2: Normal opening of the cover: Error executing script. Error for choose at pos 4: Error rendering data template: UndefinedError: 'state' is undefined
Shuttercontrol - Fenster Bad_EG_F1: Choose at step 4: Check for opening: Error executing script. Error for choose at pos 2: Error rendering data template: UndefinedError: 'state' is undefined
Logger: homeassistant.components.automation.shuttercontrol_bad_eg_f1
Quelle: components/automation/__init__.py:738
Integration: Automation (Dokumentation, Probleme)
Erstmals aufgetreten: 9. Juni 2025 um 21:37:02 (2 Vorkommnisse)
Zuletzt protokolliert: 05:00:04

Error while executing automation automation.shuttercontrol_bad_eg_f1: Error rendering data template: UndefinedError: 'state' is undefined

Hi there,
hopefully a very quick and simple question:

  • Im only using shading
  • Ive got some skylights/windows in my roof which block the blinds moving range if open to ca. 50% of their range
  • All these windows already have a opening contact

Maybe i did not see it but can the shading (or general) target-position for those windows be set to ~50% if a window is not closed?

My goal is to limit the range of these blinds to be fully open or just half closed because the window is in the way if open

Maybe its obvious what features override the “global closed position” but i did not get to clearly find the section

Thanks in advance

hi Herr.Vorragend,

since the update to the latest version (2025.06.07), the roller shutter (venetian blind) is opened despite the active sun_shading instead of remaining in sun_shading.

I have not changed anything else in the configuration.
Could you please take a look at the trace?

Trace

best regards & many thanks
Stefan

Phew, this is getting complicated.

The roller blind may have been in the shading position once. But you then lowered the roller blind to 0%. It then assumes the new status and is now in the close state. CCA can of course open from this state. This is because it no longer knows about any previous shading.

I can’t think of a way to do this at the moment. Sorry. But that’s not possible.

1 Like

You’re absolutely right, the shutter was changed to 0%.
Hmm, then I’ll have to check why there was a manual action.

I don’t think this is coming from my code, but from your additional action.

Can you please show me the content of your config parameter “auto_up_action”? Thank you.

Please see instructions in „ Tips for Creating Helpful Support Requests“ in the second post.

Sorry, my mistake. A notification should be sent there (to test whether the aditional action has been executed). I had updated the ntfy integration, something doesn’t seem to fit anymore.

Somehow, after a day my shading has started working.
Could it be the new values that I have used that are better? Could it be something else? Who knows. But I’m happy it is working now

New Update

2025.06.10
  - Fixed: The detection of weekdays and weekends is working again.

Version 2025.06.10 does not work for me. the following trace and the log entry. I am back to 2025.05.27

Logger: homeassistant.components.automation.shuttercontrol_og_2_f1
Quelle: components/automation/__init__.py:663
Integration: Automation (Dokumentation, Probleme)
Erstmals aufgetreten: 10. Juni 2025 um 23:55:00 (4 Vorkommnisse)
Zuletzt protokolliert: 05:30:00

Error rendering variables: TypeError: unhashable type: 'list'

Hi Herr.Vorragend,

I need your help once again.
This morning the shutter should change from the close position directly to the shading position, as I believe that all the parameters for this are fulfilled.
However, the shutter was opened at 07:00. There was also no manual interaction.

Can you please take another look at the trace?

Best regards & thank you
Stefan

However, I cannot see that all the shading parameters are fulfilled.

Otherwise it would be in your helper. But it says the following about shading:

"shading": {
"a": 0,
"t": 1749468589,
"p": 0,
"q": 0
},

Your trace refers to the entire normal trigger “t_open_1” and opens the roller blind in the morning.

If you say that all conditions were met before, then I would need to see the traces. But apparently nothing happened here before.

Thank you. You have not configured the Workday Tomorrow sensor in your configuration. I hadn’t taken that into account. But it has been fixed. Please update.

The shutter is in the close position from yesterday evening and the first action takes place at 07:00 when the earliest opening time starts. However, in my opinion, it should not be opened then, since the parameters for sun shading are met.
I can no longer retrieve the trace from last evening in Home Assistant.

Parameters at 07:00:
sun elevation: 14,19
sun azimut: 71,05
wetter condition: sunny
sensor.bewegung_ost_beleuchtungsstarke: 43692
sensor.temp_eg_kueche_temperatur: 24,36

Helper:
input_text.cca_kuche_fenster

11. Juni 2025

geändert zu {"open":{"a":1,"t":1749618001},"close":{"a":0,"t":1749582005},"shading":{"a":0,"t":1749468589,"p":0,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749581882},"v":5,"t":1749618001} ausgelöst durch Automation CCA - Küche Fenster ausgelöst durch Uhrzeit change or manual update via template

07:00:00 - Vor 4 Stunden
10. Juni 2025

geändert zu {"open":{"a":0,"t":1749537303},"close":{"a":1,"t":1749582005},"shading":{"a":0,"t":1749468589,"p":0,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749581882},"v":5,"t":1749582005} ausgelöst durch Automation CCA - Küche Fenster ausgelöst durch Uhrzeit change or manual update via template

21:00:05 - Vor 14 Stunden

For me, the helper is missing an entry that should be activated the shading before the regular open at 07:00 starts.

Update: I observed the behavior in two roller shutters with the same parameters.

example helper (CCA Bad OG Tür) from a working automation with the sun shading entrys:

11. Juni 2025

geändert zu {"open":{"a":1,"t":1749622503},"close":{"a":0,"t":1749575986},"shading":{"a":1,"t":1749620400,"p":0,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749578282},"v":5,"t":1749622503} ausgelöst durch Automation CCA Bad OG Tür ausgelöst durch Uhrzeit change or manual update via template

08:15:03 - Vor 5 Stunden

geändert zu {"open":{"a":0,"t":1749570434},"close":{"a":1,"t":1749575986},"shading":{"a":1,"t":1749620400,"p":0,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749578282},"v":5,"t":1749620400} ausgelöst durch Automation CCA Bad OG Tür ausgelöst durch Uhrzeit change or manual update via template

07:40:00 - Vor 5 Stunden

geändert zu {"open":{"a":0,"t":1749570434},"close":{"a":1,"t":1749575986},"shading":{"a":1,"t":1749620251,"p":1749620371,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749578282},"v":5,"t":1749620251} ausgelöst durch Automation CCA Bad OG Tür Bewegung Ost Beleuchtungsstärke via template

07:37:30 - Vor 5 Stunden

geändert zu {"open":{"a":0,"t":1749570434},"close":{"a":1,"t":1749575986},"shading":{"a":1,"t":1749617461,"p":0,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749578282},"v":5,"t":1749617461} ausgelöst durch Automation CCA Bad OG Tür ausgelöst durch Uhrzeit change or manual update via template

06:51:00 - Vor 6 Stunden

geändert zu {"open":{"a":0,"t":1749570434},"close":{"a":1,"t":1749575986},"shading":{"a":1,"t":1749617328,"p":1749617448,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749578282},"v":5,"t":1749617328} ausgelöst durch Automation CCA Bad OG Tür Bewegung Ost Beleuchtungsstärke via template

06:48:47 - Vor 6 Stunden

10. Juni 2025

geändert zu {"open":{"a":0,"t":1749570434},"close":{"a":1,"t":1749575986},"shading":{"a":0,"t":1749555293,"p":0,"q":0},"vpart":{"a":0,"t":0},"vfull":{"a":0,"t":0},"manual":{"a":0,"t":1749578282},"v":5,"t":1749578282} ausgelöst durch Automation CCA Bad OG Tür ausgelöst durch Uhrzeit change or manual update via template

19:58:02 - Vor 17 Stunden

YAML Code for both roller shutter (CCA Küche Fenster and CCA Bad OG Tür). The configured parameters are identical except for the time and temperature of the sensor.

All other roller shutters (with similar parameters) work correct in the morning, but open later in the day although the sun_shading mode should be continued. Example Trace of one roller shutter that open even though SUN_Shading should remain active.

Sorry for the long post.

that explains why it worked with the children’s windows. the tomorrow sensor is only configured there. Thank you

No problem sir, was just thinking if i just did not see it

Having a Helper-Entity which shows the target Position and reacts on Window contact could be a thing if CCA would accept a entity as target position provider

But im really not deep enough into this and leave it up to you

Thanks and not the end of the world for me right now

Btw: Since CCA is very important for me i will for sure donate

Keep up the good work

1 Like

hello, the blueprint stopps working for me. i didnt changed anything and i only have set time control

alias: Rolladen_Arbeitszimmer
description: ""
use_blueprint:
  path: hvorragend/cover_control_automation.yaml
  input:
    blind: cover.arbeitszimmer_rolladen_cover_0
    auto_options:
      - auto_up_enabled
      - auto_down_enabled
    cover_status_options: cover_helper_disabled
    open_position: 25
    close_position: 3
    time_up_early: "06:00:00"
    time_down_late: "21:00:00"
    time_down_late_non_workday: "21:00:00"
    sun_elevation_up: 6
    sun_elevation_down: 0
    brightness_up: 18
    brightness_down: 10
    brightness_time_duration: 360
    time_up_early_non_workday: "06:00:00"
    time_up_late: "08:00:00"
    time_up_late_non_workday: "08:00:00"
    check_config_debuglevel: warning
    check_config: false
    default_sun_sensor: sun.sun
    sun_time_duration: 0
    workday_sensor: binary_sensor.workday_sensor
    workday_sensor_tomorrow: binary_sensor.workday_sensor

(i also tried without workday sensor)

the trace only shows me

Führe eine Aktion nur unter einer Bedingung aus
Ausgeführt: 12. Juni 2025 um 01:21:35
if
Ausgeführt: 12. Juni 2025 um 01:21:35
Ergebnis:
result: false
if/condition/0
[Unbekannte Bedingung]
Ausgeführt: 12. Juni 2025 um 01:21:35
Ergebnis:
result: false
entities:

whats wrong?!

Please show me your entire trace.