Limit cover when closing

Hi,

I want to limit the blinds when closing.
Instead of 100% I want to limit to 90%.
But it should show me as 100% and not al 90%.

Have you got an idea?

You would have to create a template cover:

but I can’t get it to run

- platform: template
    covers:
      garagenseite_rollo:
        friendly_name: Garagenseite
        position_template: >
          {{(state_attr('cover.garagenseite','current_position'))}}
        open_cover:
          service: cover.open_cover
          data_template:
            entity_id: cover.garagenseite
        close_cover:
          service: cover.close_cover
          data_template:
            entity_id: cover.garagenseite
            data:
              position: "{{ state_attr('cover.garagenseite', 'current_position') | int - 2 }}"
        stop_cover:
          service: cover.stop_cover
          data_template:
            entity_id: cover.garagenseite
        set_cover_position:
          service: cover.set_cover_position
          data_template:
            entity_id: cover.garagenseite
            data:
              position: "{{ state_attr('cover.garagenseite', 'current_position') | int - 2 }}"