Here is what I have, I want to make the battery_level < 10 and status stopped. This is not working:
{%if is_state_attr('vacuum.jackie', 'battery_level', < 10) and is_state_attr('vacuum.jackie', 'status', 'Stopped') %}true{%endif%}
Here is what I have, I want to make the battery_level < 10 and status stopped. This is not working:
{%if is_state_attr('vacuum.jackie', 'battery_level', < 10) and is_state_attr('vacuum.jackie', 'status', 'Stopped') %}true{%endif%}
try
{{ state_attr('vacuum.jackie', 'battery_level') | int < 10 and is_state_attr('vacuum.jackie', 'status', 'Stopped') }}
3 things about your question:
vacuum.jackie
in Developer tools -> States? (if not, don’t answer the rest as it won’t work )states.vacuum.jackie.state
in Developer tools -> Template? Maybe it’s better to use that one.Stopped
is not the same as stopped
, check that out.