Use Input Select in Lovelace Config

Most core Lovelace cards do not support templating.

Your options are:

  1. Call a script with a tap action. Put the template in the script.

Or,

  1. use this: