cover:
  - platform: template
    covers:
      garagentor:
        device_class: garage
        unique_id: garagentor_fernbedienung
        friendly_name: "Garagentor"
        position_template: "{{ iif(is_state('binary_sensor.garagentor', 'on'), 100, 0) }}"
        open_cover:
          service: switch.toggle
          target:
            entity_id: switch.garagentor
        close_cover:
          service: switch.toggle
          target:
            entity_id: switch.garagentor