When door sensor is open sunshade block

Dear forum members,

Who can tell me what should be adjusted so that when it is already window open the sunshade is blocked.

Now it only works if I open the window while the screen is coming in or out.

Can anyone possibly modify this for me so that it does work.

The current yaml code is now:

alias: Zonnescherm geblokkeerd slaapkamerraam Illian geopend.
description: “”
trigger:

  • type: opened
    platform: device
    device_id: b7a3ca9a4a30d49de1cce731ce19b38b
    entity_id: 45ba428b49f5c986c900d0388ca89639
    domain: binary_sensor
    condition:
    action:
  • device_id: e1eeb233d80033ea2610020d9af86310
    domain: cover
    entity_id: 2b7a662b491ba643a1f266f118c09b72
    type: stop
    alias: Zonnescherm geblokkeerd.
    mode: single

You can start by adjusting your code above into a properly formatted version. Read this please How to help us help you - or How to ask a good question - #3