Other ways to write 'on' / 'off'

No, Lovelace does not support templates.

You can use this custom card to add Javascript templates (not jinja).

Also a word of warning about your use of quotes, you need to put double quotes outside your templates, otherwise this happens:

value_template: '{{ is_state('