i have two separete switches to control the screen up or down
now im busy to make a screen control

the code i have at templates.yaml
- cover:
- name: Screen
device_class: shutter
position: "{{ states('input_boolean.screen_up') }}"
open_cover: # move screen to UP
- condition: state
entity_id: input_boolean.screen_up # IF screen is not UP
state: "off"
- condition: state
entity_id: switch.screen_besturing_relay1 # and IF switch screen DOWN not activated
state: "off"
- action: switch.turn_on
target:
entity_id: switch.screen_besturing_relay2 # activate screen UP
close_cover: # move screen to DOWN
- condition: state
entity_id: input_boolean.screen_up # IF screen is UP
state: "on"
- condition: state
entity_id: switch.screen_besturing_relay2 # and IF switch screen UP not activated
state: "off"
- action: switch.turn_on
target:
entity_id: switch.screen_besturing_relay1 # activate screen DOWN
icon: >
{% if is_state("input_boolean.screen_up", "on") %}
mdi:window-shutter-open
{% else %}
mdi:window-shutter
{% endif %}



