Navaja

Checker · runs in your browser

Why your template returns nothing

Nine times out of ten it is an unclosed tag, a filter that needs a default, or a quote inside a quote. Paste it and find out which.

What is wrong with it
1…
Nothing leaves your browser.

The mistakes that cost people an evening

| float with no default

The single most common cause of a sensor that shows unknown. If the source is unavailable for one second, the conversion throws and takes the whole sensor with it. | float(0) keeps working.

{% without {% endif %}

An unclosed tag does not just break that template — it can stop the whole file loading, and the error points at a line nowhere near the real problem.

Quotes inside quotes

"{{ states("sensor.x") }}" ends the string early. Alternate them: double outside, single inside.

states.sensor.x.state instead of states('sensor.x')

The dotted form throws an error if the entity does not exist yet — which is exactly what happens while Home Assistant is starting up. The function form returns unknown and carries on.

Questions people ask

Does this run my template?

No. It checks the shape of it — braces, tags, filters and quoting. To see the actual result you still want Developer Tools → Template inside Home Assistant, which evaluates it against your real entities.

Why does my sensor say "unknown" instead of a number?

Usually | float or | int without a default. If the source is unavailable for a second, the conversion fails and takes the whole sensor with it. | float(0) survives that.

My template works in Developer Tools but not in the config.

That is a YAML problem, not a Jinja one: a template starting with {{ has to be quoted, and quotes inside quotes have to alternate. Our config checker catches that one.