Using Jinja2 templates in Lovelace

Is there any way to use Jinja2 templates in Lovelace? I would like to be able to do filtering with either the entity-filter or conditional card based on comparing the states of two different entities and, although I can create template sensors to do this, it would be great if I could use the Jinja2 directly in Lovelace but it doesn’t seem to work.

4 Likes

just to revive this topic, because it is my question too…

Hi,
I’m just starting with this too, but here’s what I found so far:

that links to the installation instructions:

And here’s an example

1 Like

You can check out my latest card:

it is not possible to use if then else llalala… with your card?

Everything in that custom card can be done in the markdown card. Markdown card can use all jinja logic. I would assume that custom card do it as well.

1 Like