Combining two statements into one

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’]) }}”

How about:

{{ (not is_state(‘climate.brock_hall_north’, [‘cool’,‘heat’]) && not is_state(‘climate.brock_hall_south’, [‘cool’,‘heat’])) }}

Thanks so much… I was close. I was trying “and” instead of “&&”

“and” is also valid.

{{ state('climate.brock_hall_north') not in ['cool','heat'] and state('climate.brock_hall_south') not in ['cool','heat'] }}

Neither works. Your example returns ‘state’ is undefined

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

Thank you very much. :+1:

1 Like

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’] }}