A rule does not apply¶
What you see¶
An item ignores a rule you wrote, or shows another colour, icon or text than expected.
Why it happens¶
For each output field the first rule that matches and sets that field wins. Entity states are strings, so on without quotes in YAML is read as a boolean. Templates are rendered live by Home Assistant, but they are not computed in the editor preview.
What to do¶
- Check the order of the rules, the first match wins for each field.
- In YAML write
state: "on"in quotes. - Judge templates on the real card, not in the editor preview.