Create own "cover" entity

Hi together,

I have 2 switches in Home Assistant and want to create a “cover.markise”
to get 2 icons in lovelace “up” and “down”

- platform: template
  covers:
      markise:
        device_class: shutter
        friendly_name: "Markise"
        open_cover:
          action:  automation.turn_on
          target:
            entity_id: automation.markise_auf
        close_cover:
          service:  automation.turn_on
          target:
              entity_id: automation.markise_zu
        stop_cover:
          service:  automation.turn_on
          target:
              entity_id: automation.markise_stopp

i will use automation to block each switch to the other.

But the automations will not called up, whats wrong??

thanky in advance

automation.turn_on/off just enables or disables the automation. Make scripts instead of automations if you aren’t using triggers.