Open the cover if someone opens the window

Hi

i would like to open the cover to value “10” if it is closed. but i can not find where the problem is. who can tell me my mistake?

- id: rolladen_esszimmer_auf
  alias: rollladen im esszimmer wird auf 90 prozent hochgefahren wenn er geschlossen war
  description: 'wenn fenster auf dann rolladen hoch'
  trigger:
  - entity_id: binary_sensor.neq1838379_state
    platform: state
    to: 'on'
  condition:
    condition: numeric_state
    entity_id: cover.ez_rollo
    below: 9
  action:
  - service: cover.set_cover_position
    data:
      entity_id: cover.ez_rollo
      position: 10

Is the cover position an attribute of the cover entity? If so, you need to use a template condition since it looks like you are using a condition on the state of the cover instead of the position attribute that would be something like:

        condition: template
        value_template: '{{ state_attr('cover.ez_rollo', 'current_position') < 9 }}'