Maybe:
Or go all in and switch to YAML mode editing only, where YAML anchors and/or Lovelace_gen is available.