Creating combination of shades/windows opening

Hi,

I have a Velux window integrated via Somfy which I can already openend/close and set the outer blinds as I wish. This works all perfect.

However, these windows don’t like blind movement if the windows are open. You can open/close the windows at any blind position but you should not move the blind if the window is open.

To keep this save I could deactivate the blinds when the window is open. But this would also stop some automations on these windows working if they are open. So my idea is to create a new, virtual blind entitiy which always automatically closes the window first if the blind position should be changed. I would then hide the “original” blinds and everything should work. If I add the virtual blind entities into automations, they also will continue working: First close the window, then open/close the blind.

Unfortunatley I have NO clue how to do it. Could you help me to get some idea here?

Thanks in advance,

Simon

You can create a template cover for the blinds. For the open and close sequences you can add as many services as you like (to close the windows first for example).

        open_cover:
          - service: script.close_window
          - delay: 6 # or however long it takes to close the window
          - service: script.open_blind
        close_cover:
          - service: script.close_window
          - delay: 6 # or however long it takes to close the window
          - service: script.close_blind

You could even use a wait_template instead of a delay, so you are not waiting longer than necessary if the windows are already closed or oly partly open.

Great, this looks exactly like what I need. However this pushes me now over the limits of my “knowledge”.

I did something like this

  - platform: template
    covers:
      WZ_DFF:
        device_class: shade
        friendly_name: "Wohnzimmer DFF"
        value_template: "{{ states('sensor.wz_dff_rollo_alle')|float > 0 }}"
        open_cover:
          service: script.fenster_wz_dff_schliesen
          service: script.rollos_wz_dff_oben_offnen
        close_cover:
          service: close.cover.wz_dff_fenster
          service: close.cover.wz_dff_rollo_alle
        stop_cover:
          service: stop.cover.wz_dff_rollo_alle

However, I receive an error “duplicate key” for open and close cover.

Just some more information

  1. I have three of these windows next to each other and I already grouped the three covers and three windows.
  2. The windows are setup as covers (by system).

I now created scripts with the functions close windows as well as open/close/stop covers.

I know that i AM doing things wrong, could you help me to find the right way?

BR Simon

Edit: I thought I do not need the delay as the windows by themselves are doing all movements (windows and covers) consecutively.

The open and close sequences are lists of actions, just like a script or automation actions.

        open_cover:
          - service: script.fenster_wz_dff_schliesen
          - service: script.rollos_wz_dff_oben_offnen
        close_cover:
          - service: close.cover.wz_dff_fenster
          - service: close.cover.wz_dff_rollo_alle
        stop_cover:
          service: stop.cover.wz_dff_rollo_alle

So I do not really need scripts as my actions are quite easy, correct?

However it is still not possible to me to create this as I get error “duplicate key”

grafik

Look closely at what I wrote (twice) and look closely at what you wrote. You are missing the leading dashes “-” in front of each action.

And no you don’t need to use scripts. You can use any valid action.