@Ralph_Bisschops wrote:
Hi all,
I’m trying to validate in a script.
Initially I used:
{% if ( states.input_select.toilet_heating.state != 'Uit') %} true {% else %} false {% endif %}
This validates the value and results in true or false (so both without capitals)
I replaced this with:
{{ false if is_state('input_select.toilet_heating','Uit') else true }}
This also validates, however the result is True or False (so with capitals)
The first code block works ok, the second does not. The validation is always true (or ignored, can’t check that). I tried with the template editor is HA btw.
So two questions:
Why is the result different? Should not be the case as the code is both valid.
Is there a difference in the response of HA to capitals or no capitals (so True vs true) looks like there is and I expect it to be different.
Thanks
Ralph
Posts: 7
Participants: 3