With very few exceptions core dashboard cards do not support templates. Unless specifically stated in the documentation that an option supports templates, then it does not.
You have a few options:
- Use a 3rd party card that does support templates
- Use Card-Mod
- Use the 100% Templateable Lovelace frontend resource.