Closed jaburges closed 4 years ago
Can you try with the template as just '{{state}}' to see if it is the name that is causing the issue?
@jaburges In addition to my suggestion above, is there a possibility that you are using a wrapper card around this card which could be doing Jinja2 templating?
If so, it be be mis-interpreting the content_template as an actual Jinja2 template and causing this issue.
A workaround for this would be to put it as:
content_template: '{% raw %}{{state}} in the {{display_name}}{% endraw %}'
That tells the templating engine that it should be treated as regular text and not a template.
@gadgetchnnel thank you, that indeed was the issue, and your solution solved it!
Hi there, so i'm using
content_template
as per below. Note MQTT devices do not have afriendly_name
so usingname:
in the card config.With the above I just get
in the
displayed, no state information. I have tried using customize.yaml in my configuration to add afriendly_name
to these devices, but that doesnt work either. If I comment outcontent_template
I getLiving Room @ Detected
as expected.I very easily could be missing something, just doesnt seem to be rendering the templates.