Reuse template yaml for multiple entities

I had to create a cover template for some Somfy RTS shades that I’ve had installed. They only have one-way communication so, to be able to have a state other than “unknown”, I created the following cover templates for the different shades:

- platform: template
  covers:
    kids_bedroom_shades:
      device_class: shade
      friendly_name: "Kids' Bedroom Shades"
      open_cover:
        - service: cover.open_cover
          target:
            entity_id: cover.rts_kids_bedroom_shades
      stop_cover:
        - service: cover.stop_cover
          target:
            entity_id: cover.rts_kids_bedroom_shades
      close_cover:
        - service: cover.close_cover
          target:
            entity_id: cover.rts_kids_bedroom_shades

    parents_bedroom_shades:
      device_class: shade
      friendly_name: "Parents' Bedroom Shades"
      open_cover:
        - service: cover.open_cover
          target:
            entity_id: cover.rts_parents_bedroom_shades
      stop_cover:
        - service: cover.stop_cover
          target:
            entity_id: cover.rts_parents_bedroom_shades
      close_cover:
        - service: cover.close_cover
          target:
            entity_id: cover.rts_parents_bedroom_shades

The covers with the ‘rts_’ prefix are the ones from the integration.
In this case I only have two shades so I can deal with the copy-paste, but I’ve run into a similar situation with another integration where I’d prefer to be able to reuse the code.

I was thinking of using YAML anchors but I can’t figure out how to replace the entity_id for the base entity (i.e. ‘cover.rts_kids_bedroom_shades’ and ‘cover.rts_parents_bedroom_shades’). Is there a way of creating a variable that can be reused multiple times in each alias?