Closed Ruud-Mens closed 2 years ago
My template-driven card selector has also completely stopped working with 1.9.1 -- the resulting dashboard is empty, with none of the states shown. This is despite there being a default, the template working fine, and everything working well with state-switch from June. One interesting thing I observed is that it seems to be racy/non-deterministic -- if I repeatedly reload the page about 1/10th of the the card corresponding to the current state is actually displayed.
Same problem for me
Same behavior here; any update on this case? thankyou
Same problem here. Template works fine in Developer tools, but not in the custom:state-switch card.
I had the same problem with this, and looking through some of the changes in 1.9+ noticed that the syntax for templating had been changed. As a test i changed it back to what was in the previous version, and it seems to work: instead of
entity: >
{% if is_state('input_boolean.test_one', 'on') %}
yes
{% else %}
no
{% endif %}`
i've used
entity: template
template: >
{% if is_state('input_boolean.test_one', 'on') %}
yes
{% else %}
no
{% endif %}`
And that seems to work
The state switch is working when using an On - Off entity. But when I use a template, the matching state isn't triggered (class no-match).
Tested the template in the developer tools, and it returns the correct string.