But I get an error message: invalid key: "OrderedDict([('states("sensor.pihole_hostname")', None)])" in "/config/lovelace-admin/40-system.yaml", line 125, column 0
The template works correctly on its own in Developer Tools --> Template. Also, the card works correctly, if I use a simple string instead of the Jinja2 template.
Is there any way to do this (using the default lovelace controls)?