New template format not working for cover

I was trying to use the new format for templates, because at the moment my configuration file is the mix of the legacy format and the new format. So I was trying to update this (snippet)

cover:
  - platform: template
    covers:
      # Office
      shutter_office:
        position_template: unknown
        friendly_name: "Kantoor"
        icon_template: mdi:chair-rolling
        device_class: shutter
        open_cover:
          service: rest_command.office_open
        close_cover:
          service: rest_command.office_close

to this

template:
  - cover:
      # Office
      - name: "shutter_office"
        position_template: unknown
        friendly_name: "Kantoor"
        icon_template: mdi:chair-rolling
        device_class: shutter
        open_cover:
          service: rest_command.office_open
        close_cover:
          service: rest_command.office_close

But with the new format “cover.shutter_office” is suddenly missing. What did I do wrong?

Note: I does work for all my “sensor” and “binary_sensor” configurations, so I was in the illusion I understood this :wink:

The “modern” format for templates only works for binary sensors, buttons, images, numbers, selects and sensors. The docs show only the “old” format for covers.

The new format only applies to

Sensors, binary (on/off) sensors, buttons, images, numbers and selects

See Template - Home Assistant

Edit: :ninja: by mekaneck