YAML Templates for configuration.yaml

Decluttering-card is what you are looking for

It’s not in your configuration.yaml but in your lovelace config, you define a template and can then reuse this with variables.