Quantcast
Viewing all articles
Browse latest Browse all 104562

Is_state_attr(...) with none argument to test

@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 104562

Trending Articles