Hi there, I wonder why the is_state
function used in the for loop is not correct.
{{ is_state('light.wohnzimmer_kronleuchter', 'on') }}
returns what I expected as a result: True
I was testing if I can do that while iterating over the state objects. Unfortunately I do not understand the result:
{% for state in states.light %}
{{ state.entity_id }}
{{ state.state }}
{{ is_state(state.state, 'on') }}
{%- endfor %}
displays the following amongst others
...
light.wohnzimmer_kronleuchter
on
False
...
I wonder why the statement in the for loop is_state(state.state, 'on')
is False
in this case. I was hoping for True
.
I appreciate your help in teaching me to understand this. Thank you all.
1 post - 1 participant