New Template YAML code

I have been trying to migrate Legacy sensor code to new template format. Using Shelly 1 relay and contact sensor to know garage door position. Currently have this code in template.yaml

- cover:
      - name: Garage_Door
        device_class: garage
        set_cover_position: "{{is state('binary_sensor.shelly_1_500291edxxxx_input 0, '100' }}"
however not understanding this section:

position [template](https://www.home-assistant.io/docs/configuration/templating/) (Optional)

Defines a template to get the position of the cover. Legal values are numbers between `0` (closed) and `100` (open). If the template produces a `None` value the current position will be set to `unknown`.
Error received:
Logger: homeassistant.config
Source: config.py:xxx

Invalid config for 'template' at template.yaml, line xx: invalid template (TemplateSyntaxError: expected token 'end of print statement', got 'state') for dictionary value 'cover->0->position', got "{{is state('binary_sensor.shelly_1_500291edxxxx_input 0, '100' }}"
Invalid config for 'template' at template.yaml, line xx: expected dictionary 'cover->0->set_cover_position->0', got '{'

Any assistance would be greatly appreciated