You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to populate a template card (mushroom template) using lovelace_gen. So I need to escape the parts that I want jinja to pass through with {% raw %}, however I want to use a variable from lovelace_gen (in the below case {{entity}}. Is below an acceptable syntax? I doesn't seem to like it.
{% raw %}
icon: >-
{% if is_state({% endraw %}{{entity}}{% raw %},'on') %}
mdi:lightbulb-on
{% raw %}{% elif is_state({% endraw %}{{entity}}{% raw %},'off') %}
mdi:lightbulb-off
{% else %}
mdi:lightbulb-alert
{% endif%}
{% endraw %}
The text was updated successfully, but these errors were encountered:
I want to populate a template card (mushroom template) using lovelace_gen. So I need to escape the parts that I want jinja to pass through with {% raw %}, however I want to use a variable from lovelace_gen (in the below case {{entity}}. Is below an acceptable syntax? I doesn't seem to like it.
The text was updated successfully, but these errors were encountered: