Basic question about what to place where (and when), like templating inside a tile card

I am trying a lot with templating but I don’t get it always…

I have a tile with the state of a boolean sensor. But when the sensor is on, I want it to show the state (temperature) of an other sensor. But every time I try it in the code editor, it gets deleted or seems not supported.

type: tile
entity: input_boolean.sauna
tap_action:
  action: none
icon_tap_action:
  action: none
state_content: state

I add to the state_content:

{% if is_state('input_boolean.state' == 'on' %} {{ (states('sensor.sauna_temperatuur) }} {% else %} Uit {% endif %}

But that doesn’t work and I don’t know if my Jinja is wrong or if my yaml is wrong.

Hi, the standard tile card does not suport templates.
Not sure if you have explored HACS yet, if so, maybe mushroom template card can help.

1 Like

Is that it… there are too many exceptions, changes and things to remember… the template code should be right, right?

you can paste your template code in Developer Tools > Template to see it in action (or not)