Gap Card height from entity variable

I’m in the process of trying to simplify my configuration by breaking my cards out into individual files that can then be included into different views. This is working fine until I got to a view with multiple gap cards with different heights. My thought was to use a variable entity (var.gap_card_height) to set the height in the card but unfortunately it doesn’t seem to be working. If I create a view with the following:

      - type: custom:gap-card
        height: 13
      - type: entities
          - var.gap_card_height

      - type: custom:gap-card
        height: var.gap_card_height

A gap card with the hard coded value is inserted, followed by an entity card with gap card height 25, but then there is no gap card between this and the next card. No errors or warnings, just a fully rendered page without the second gap card. Should this not work?

Variables can be displayed in Lovelace. They can’t be used as templates.