Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 101645

Is_state_attr(...) with none argument to test

$
0
0

@stezak wrote:

Why do the following two comparisons NOT return the same result?

{% if state_attr('climate.home_2', 'preset_mode') == none %}A{% else %}B{% endif %}

{% if is_state_attr('climate.home_2', 'preset_mode', none) %}A{% else %}B{% endif %}

Templating result:

A

B

Posts: 10

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 101645

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>