Multiple cover garage door

I have 3 garagedoor with 1 inputswitch and 1 outputswitch for each garage door. When i only test one garagedoor in the code it works fine, but when i add 2 more i got error-message.

cover:
  - platform: template
    covers:
    garage_door_vanster:
        device_id: vanster
        device_class: garage
        friendly_name: "Garage Dörr Vänster"
        value_template: "{{ is_state('switch.garagedorr_vanster_oppen', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_vanster
        close_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_vanster
        stop_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_vanster
    
    
    garage_door_mitten:
        device_id: mitten
        device_class: garage
        friendly_name: "Garage Dörr Mitt"
        value_template: "{{ is_state('switch.garagedorr_mitt_oppen', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_mitt
        close_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_mitt
        stop_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_mitt

and the error-message is:

Invalid config for [cover.template]: expected dictionary for dictionary value @ data['covers']. Got None
extra keys not allowed @ data['garage_door_hoger']. Got OrderedDict([('device_id', 'hoger'), ('device_class', 'garage'), ('friendly_name', 'Garage Dörr Höger'), ('value_template', "{{ is_state('switch.garagedorr_hoger_oppen', 'on') }}"), ('open_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port_hoger')])), ('close_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port_hoger')])), ('stop_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_p...
extra keys not allowed @ data['garage_door_mitten']. Got OrderedDict([('device_id', 'mitten'), ('device_class', 'garage'), ('friendly_name', 'Garage Dörr Mitt'), ('value_template', "{{ is_state('switch.garagedorr_mitt_oppen', 'on') }}"), ('open_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port_mitt')])), ('close_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port_mitt')])), ('stop_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port...
extra keys not allowed @ data['garage_door_vanster']. Got OrderedDict([('device_id', 'vanster'), ('device_class', 'garage'), ('friendly_name', 'Garage Dörr Vänster'), ('value_template', "{{ is_state('switch.garagedorr_vanster_oppen', 'on') }}"), ('open_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port_vanster')])), ('close_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.oppna_stang_port_vanster')])), ('stop_cover', OrderedDict([('service', 'switch.turn_on'), ('entity_id', 'switch.opp.... (See ?, line ?).

Im new on homeassistant so maybe an newbie mistake.
What is wrong in my code?

Looks like an indentation issue to me and the covers list items need to be indented e.g.

cover:
  - platform: template
    covers:
      garage_door_vanster:
        *etc*
      garage_door_mitten:
        *etc*

This wasnt working either.

It looks from the error messages as though you are only posting part of the problem configuration.

They refer to 3 different garage doors: hoger, mitten and vanster.

Perhaps if you can post the formatted full garage door section of your configuration and what you have tried so far I can offer more than an guess as to the issue.

sensor:
  - platform: sensor
    sensors:
      timetonextcal:
        friendly_name: Arbete Hanna börjar om
        entity_id: sensor.time
        value_template: >-
          {% if states.calendar.Hanna_jobb.attributes.start_time %}
            {{((as_timestamp(states.calendar.Hanna_jobb.attributes.start_time) - as_timestamp(now())) / 60) | default(99) | int }}
          {%- else -%}
            0
          {%- endif %}
          

cover:
  - platform: template
    covers:
    vanster_garage_door:
        friendly_name: "Garage Dorr Vanster"
        value_template: "{{ is_state('switch.garagedorr_vanster_oppen', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_vanster
        close_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_vanster
        stop_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_vanster
    
    mitten_garage_door:
        friendly_name: "Garage Dorr mitten"
        value_template: "{{ is_state('switch.garagedorr_mitt_oppen', 'on') }}"
        open_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_mitt
        close_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_mitt
        stop_cover:
          service: switch.turn_on
          entity_id: switch.oppna_stang_port_mitt

Here is my code for my garagedoors. I have test to set an unique id for each under frindly name.
The entitis is from my niko home control system.

I agree with @TazUk, the indentation looks wrong.
You have no indentations between covers and vanster_… and then you have four spaces to friendly_name.

The errors you have posted in your original post reference three entities:

  • garage_door_hoger
  • garage_door_mitten
  • garage_door_vanster

The code you have posted shows no entity with a name ‘Hoger’ so your errors and code in this thread do not match.

The code you have posted is not indented correctly, hence the ‘invalid config for cover.template’ error.
You can see the correct indentation in the documented examples, ie.:

cover:
  - platform: template
    covers:
      vanster_garage_door:
        friendly_name: "Garage Dorr Vanster"
        value_template: "{{ is_state('switch.garagedorr_vanster_oppen', 'on') }}"
        open_cover:
          service: switch.turn_on
          target:
            entity_id: switch.oppna_stang_port_vanster
        close_cover:
          service: switch.turn_on
          target:
            entity_id: switch.oppna_stang_port_vanster
        stop_cover:
          service: switch.turn_on
          target:
            entity_id: switch.oppna_stang_port_vanster    
      mitten_garage_door:
        friendly_name: "Garage Dorr mitten"
        value_template: "{{ is_state('switch.garagedorr_mitt_oppen', 'on') }}"
        open_cover:
          service: switch.turn_on
          target:
            entity_id: switch.oppna_stang_port_mitt
        close_cover:
          service: switch.turn_on
          target:
            entity_id: switch.oppna_stang_port_mitt
        stop_cover:
          service: switch.turn_on
          target:
            entity_id: switch.oppna_stang_port_mitt

I presume that the other garage door (garage_door_hoger) may also have these issues but since you aren’t showing that code cannot confirm.
Therefore it is quite possible that if you only correct part of the indentation you will still have configuration errors reported.

Now with correct indentation it works.
Thanks!