tkaser
March 27, 2024, 2:51am
1
Is there a way I can combine the two following statements into a single statement? I tried grouping my climate entities but that doesn’t seem to be an option.
“{{ not is_state(‘climate.brock_hall_north’, [‘cool’,‘heat’]) }}”
“{{ not is_state(‘climate.brock_hall_south’, [‘cool’,‘heat’]) }}”
tkaser
March 27, 2024, 2:55am
3
Thanks so much… I was close. I was trying “and” instead of “&&”
tom_l
March 27, 2024, 4:34am
4
“and” is also valid.
{{ state('climate.brock_hall_north') not in ['cool','heat'] and state('climate.brock_hall_south') not in ['cool','heat'] }}
tkaser
March 27, 2024, 11:47am
5
Neither works. Your example returns ‘state’ is undefined
tom_l
March 27, 2024, 11:50am
6
Doh. Should be states
.
{{ states('climate.brock_hall_north') not in ['cool','heat'] and states('climate.brock_hall_south') not in ['cool','heat'] }}
2 Likes
tkaser
March 27, 2024, 9:40pm
8
I had to adjust the statement from “and” to “or”. I was not receiving a result for the 1st entity in the statement. Thanks again for your help.
{{ states(‘climate.brock_hall_north’) not in [‘cool’,‘heat’] or states(‘climate.brock_hall_south’) not in [‘cool’,‘heat’] }}