Trying to configure a climate control automation with Flair Smart Vents

I think I might be a bit in over my head with what I am trying to accomplish. Unfortunately, I have not been able to find anything in the forum or on Reddit or any other sites which led me to creating an account on here.

What I am trying to do is use template triggers to monitor the temperature of my ecobee sensors, compare them to each other and then open/close the Flair Vents, on the condition of whether the ecobee equipment running is either ‘auxHeat1, fan’ or ‘compCool1’.

Our upstairs gets less air than downstairs. I previously was using the Flair Vents in auto mode so maybe it’s because we only have vents on the main floor and not upstairs, but it ends up leaving the vents open until the target temperature is reached which means the ecobee turns off before the upstairs has enough time to heat/cool.

Anyways, on to my current automation. I have tried several different iterations of the automation so I will just put this one in here with the hopes that someone can point me in the right direction. I know that the repeat causes an infinite loop, but this is basically the same as my first iteration with the addition of the repeat action.

alias: Climate Control 3
description: ""
trigger:
  - platform: template
    value_template: "{{ state_attr('climate.ecobee', 'equipment_running') == 'compCool1,fan' }}"
    id: ecobee_is_cooling
  - platform: template
    value_template: "{{ state_attr('climate.ecobee', 'equipment_running') == 'auxHeat1,fan' }}"
    id: ecobee_is_heating
  - platform: template
    value_template: "{{ state_attr('climate.ecobee', 'equipment_running') == 'fan' }}"
    id: ecobee_is_circulating
condition: []
action:
  - choose:
      - conditions: []
        sequence:
          - repeat:
              sequence:
                - condition: or
                  conditions:
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'ceil')
                        }} >= {{
                        states('sensor.living_room_temperature')|round(0,
                        'ceil') }}
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'ceil')
                        }} >= {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'ceil') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'ceil') }} >= {{
                        states('sensor.living_room_temperature')|round(0,
                        'ceil') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'ceil') }} >= {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'ceil') }}
                - device_id: 17f1237c78a7fe66e862444c1419ed20
                  domain: cover
                  entity_id: 4a787418abbf51c5b5d5278e356acf5a
                  type: set_tilt_position
                  position: 0
                - device_id: fee8098b53d00382da374b6eb53237ba
                  domain: cover
                  entity_id: 10f054161df2bd91318f7dd8c0d96e46
                  type: set_tilt_position
                  position: 0
                - device_id: 85d97da3e4b53ac396103826c33cccc9
                  domain: cover
                  entity_id: b99e3fc85c05ad53e976c65e53c4167f
                  type: set_tilt_position
                  position: 0
                - device_id: 995c6caacc583617bf718569ad60d364
                  domain: cover
                  entity_id: 85146117e86dbb53f339f904046215f6
                  type: set_tilt_position
                  position: 0
              while: []
      - conditions: []
        sequence:
          - repeat:
              sequence:
                - condition: or
                  conditions:
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'floor')
                        }} <= {{
                        states('sensor.living_room_temperature')|round(0,
                        'floor') }}
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'floor')
                        }} <= {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'floor') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'floor') }} <= {{
                        states('sensor.living_room_temperature')|round(0,
                        'floor') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'floor') }} <= {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'floor') }}
                - device_id: 17f1237c78a7fe66e862444c1419ed20
                  domain: cover
                  entity_id: 4a787418abbf51c5b5d5278e356acf5a
                  type: set_tilt_position
                  position: 0
                - device_id: fee8098b53d00382da374b6eb53237ba
                  domain: cover
                  entity_id: 10f054161df2bd91318f7dd8c0d96e46
                  type: set_tilt_position
                  position: 0
                - device_id: 85d97da3e4b53ac396103826c33cccc9
                  domain: cover
                  entity_id: b99e3fc85c05ad53e976c65e53c4167f
                  type: set_tilt_position
                  position: 0
                - device_id: 995c6caacc583617bf718569ad60d364
                  domain: cover
                  entity_id: 85146117e86dbb53f339f904046215f6
                  type: set_tilt_position
                  position: 0
              while: []
      - conditions:
          - condition: trigger
            id:
              - ecobee_is_circulating
        sequence:
          - device_id: 17f1237c78a7fe66e862444c1419ed20
            domain: cover
            entity_id: 4a787418abbf51c5b5d5278e356acf5a
            type: set_tilt_position
            position: 50
          - device_id: fee8098b53d00382da374b6eb53237ba
            domain: cover
            entity_id: 10f054161df2bd91318f7dd8c0d96e46
            type: set_tilt_position
            position: 50
          - device_id: 85d97da3e4b53ac396103826c33cccc9
            domain: cover
            entity_id: b99e3fc85c05ad53e976c65e53c4167f
            type: set_tilt_position
            position: 50
          - device_id: 995c6caacc583617bf718569ad60d364
            domain: cover
            entity_id: 85146117e86dbb53f339f904046215f6
            type: set_tilt_position
            position: 50
      - conditions: []
        sequence:
          - repeat:
              sequence:
                - condition: and
                  conditions:
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'ceil')
                        }} < {{
                        states('sensor.living_room_temperature')|round(0,
                        'ceil') }}
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'ceil')
                        }} < {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'ceil') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'ceil') }} < {{
                        states('sensor.living_room_temperature')|round(0,
                        'ceil') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'ceil') }} < {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'ceil') }}
                - device_id: 17f1237c78a7fe66e862444c1419ed20
                  domain: cover
                  entity_id: 4a787418abbf51c5b5d5278e356acf5a
                  type: set_tilt_position
                  position: 100
                - device_id: fee8098b53d00382da374b6eb53237ba
                  domain: cover
                  entity_id: 10f054161df2bd91318f7dd8c0d96e46
                  type: set_tilt_position
                  position: 100
                - device_id: 85d97da3e4b53ac396103826c33cccc9
                  domain: cover
                  entity_id: b99e3fc85c05ad53e976c65e53c4167f
                  type: set_tilt_position
                  position: 100
                - device_id: 995c6caacc583617bf718569ad60d364
                  domain: cover
                  entity_id: 85146117e86dbb53f339f904046215f6
                  type: set_tilt_position
                  position: 100
              while: []
      - conditions: []
        sequence:
          - repeat:
              sequence:
                - condition: and
                  conditions:
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'floor')
                        }} > {{
                        states('sensor.living_room_temperature')|round(0,
                        'floor') }}
                    - condition: template
                      value_template: >-
                        {{ states('sensor.office_temperature')|round(0, 'floor')
                        }} > {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'floor') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'floor') }} > {{
                        states('sensor.living_room_temperature')|round(0,
                        'floor') }}
                    - condition: template
                      value_template: >-
                        {{
                        states('sensor.upstairs_bedroom_temperature')|round(0,
                        'floor') }} > {{
                        states('sensor.master_bedroom_temperature')|round(0,
                        'floor') }}
                - device_id: 17f1237c78a7fe66e862444c1419ed20
                  domain: cover
                  entity_id: 4a787418abbf51c5b5d5278e356acf5a
                  type: set_tilt_position
                  position: 100
                - device_id: fee8098b53d00382da374b6eb53237ba
                  domain: cover
                  entity_id: 10f054161df2bd91318f7dd8c0d96e46
                  type: set_tilt_position
                  position: 100
                - device_id: 85d97da3e4b53ac396103826c33cccc9
                  domain: cover
                  entity_id: b99e3fc85c05ad53e976c65e53c4167f
                  type: set_tilt_position
                  position: 100
                - device_id: 995c6caacc583617bf718569ad60d364
                  domain: cover
                  entity_id: 85146117e86dbb53f339f904046215f6
                  type: set_tilt_position
                  position: 100
              while: []
    enabled: true
mode: single

Is 'compCool1,fan' a single attribute value or two possible values?

For your comparisons, the operators need to be within the curly brackets, otherwise you’re just creating weird strings:

value_template: >-
  {{ states('sensor.office_temperature')|round(0, 'ceil') >=
  states('sensor.living_room_temperature')|round(0, 'ceil') }}

Why don’t your Choose options or whiles have conditions?

The compCool1, fan variable is the output from the equipment_running attribute from the “states” section of the developer section.

I did look again at my comparisons and I am glad you mentioned that because I did have them wrong. During one of my iterations, I had copied and pasted the wrong template from the “templates” section in the developer section. I fixed that and when I tested the conditions, some of them worked (which is the result that I expected and was trying to achieve). I am not entirely sure still if I figured this out and it works correctly because the temperature where I live has been right in that spot where it doesn’t cause the heating or cooling to come on.

Here is my updated automation:

description: ""
trigger:
  - platform: template
    value_template: >-
      {{ states('sensor.office_temperature')|round(0, 'ceil') >=
      states('sensor.living_room_temperature')|round(0, 'floor') }}
    id: office_greater_living
  - platform: template
    value_template: >-
      {{ states('sensor.office_temperature')|round(0, 'ceil') >=
      states('sensor.master_bedroom_temperature')|round(0, 'floor') }}
    id: office_greater_master
  - platform: template
    value_template: >-
      {{ states('sensor.upstairs_bedroom_temperature')|round(0, 'ceil') >=
      states('sensor.living_room_temperature')|round(0, 'floor') }}
    id: upstairs_greater_living
  - platform: template
    value_template: >-
      {{ states('sensor.upstairs_bedroom_temperature')|round(0, 'ceil') >=
      states('sensor.master_bedroom_temperature')|round(0, 'floor') }}
    id: upstairs_greater_master
  - platform: template
    value_template: >-
      {{ states('sensor.office_temperature')|round(0, 'floor') <=
      states('sensor.living_room_temperature')|round(0, 'ceil') }}
    id: office_less_living
  - platform: template
    value_template: >-
      {{ states('sensor.office_temperature')|round(0, 'floor') <=
      states('sensor.master_bedroom_temperature')|round(0, 'ceil') }}
    id: office_less_master
  - platform: template
    value_template: >-
      {{ states('sensor.upstairs_bedroom_temperature')|round(0, 'floor') <=
      states('sensor.living_room_temperature')|round(0, 'ceil') }}
    id: upstairs_less_living
  - platform: template
    value_template: >-
      {{ states('sensor.upstairs_bedroom_temperature')|round(0, 'floor') <=
      states('sensor.master_bedroom_temperature')|round(0, 'ceil') }}
    id: upstairs_less_master
  - platform: template
    value_template: "{{ state_attr('climate.ecobee', 'equipment_running') == 'fan' }}"
    id: ecobee_is_circulating
condition: []
action:
  - choose:
      - conditions:
          - condition: or
            conditions:
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'ceil') >=
                  states('sensor.living_room_temperature')|round(0, 'floor') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'ceil') >=
                  states('sensor.master_bedroom_temperature')|round(0, 'floor')
                  }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'ceil') >= states('sensor.living_room_temperature')|round(0,
                  'floor') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'ceil') >=
                  states('sensor.master_bedroom_temperature')|round(0, 'floor')
                  }}
        sequence:
          - if:
              - condition: template
                value_template: >-
                  {{ state_attr('climate.ecobee', 'equipment_running') ==
                  'compCool1,fan' }}
            then:
              - device_id: 17f1237c78a7fe66e862444c1419ed20
                domain: cover
                entity_id: 4a787418abbf51c5b5d5278e356acf5a
                type: set_tilt_position
                position: 0
              - device_id: fee8098b53d00382da374b6eb53237ba
                domain: cover
                entity_id: 10f054161df2bd91318f7dd8c0d96e46
                type: set_tilt_position
                position: 0
              - device_id: 85d97da3e4b53ac396103826c33cccc9
                domain: cover
                entity_id: b99e3fc85c05ad53e976c65e53c4167f
                type: set_tilt_position
                position: 0
              - device_id: 995c6caacc583617bf718569ad60d364
                domain: cover
                entity_id: 85146117e86dbb53f339f904046215f6
                type: set_tilt_position
                position: 0
      - conditions:
          - condition: or
            conditions:
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'floor') <=
                  states('sensor.living_room_temperature')|round(0, 'ceil') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'floor') <=
                  states('sensor.master_bedroom_temperature')|round(0, 'ceil')
                  }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'floor') <= states('sensor.living_room_temperature')|round(0,
                  'ceil') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'floor') <=
                  states('sensor.master_bedroom_temperature')|round(0, 'ceil')
                  }}
        sequence:
          - if:
              - condition: template
                value_template: >-
                  {{ state_attr('climate.ecobee', 'equipment_running') ==
                  'auxHeat1,fan' }}
            then:
              - device_id: 17f1237c78a7fe66e862444c1419ed20
                domain: cover
                entity_id: 4a787418abbf51c5b5d5278e356acf5a
                type: set_tilt_position
                position: 0
              - device_id: fee8098b53d00382da374b6eb53237ba
                domain: cover
                entity_id: 10f054161df2bd91318f7dd8c0d96e46
                type: set_tilt_position
                position: 0
              - device_id: 85d97da3e4b53ac396103826c33cccc9
                domain: cover
                entity_id: b99e3fc85c05ad53e976c65e53c4167f
                type: set_tilt_position
                position: 0
              - device_id: 995c6caacc583617bf718569ad60d364
                domain: cover
                entity_id: 85146117e86dbb53f339f904046215f6
                type: set_tilt_position
                position: 0
      - conditions:
          - condition: trigger
            id:
              - ecobee_is_circulating
        sequence:
          - device_id: 17f1237c78a7fe66e862444c1419ed20
            domain: cover
            entity_id: 4a787418abbf51c5b5d5278e356acf5a
            type: set_tilt_position
            position: 50
          - device_id: fee8098b53d00382da374b6eb53237ba
            domain: cover
            entity_id: 10f054161df2bd91318f7dd8c0d96e46
            type: set_tilt_position
            position: 50
          - device_id: 85d97da3e4b53ac396103826c33cccc9
            domain: cover
            entity_id: b99e3fc85c05ad53e976c65e53c4167f
            type: set_tilt_position
            position: 50
          - device_id: 995c6caacc583617bf718569ad60d364
            domain: cover
            entity_id: 85146117e86dbb53f339f904046215f6
            type: set_tilt_position
            position: 50
      - conditions:
          - condition: and
            conditions:
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'ceil') <=
                  states('sensor.living_room_temperature')|round(0, 'floor') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'ceil') <=
                  states('sensor.master_bedroom_temperature')|round(0, 'floor')
                  }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'ceil') <= states('sensor.living_room_temperature')|round(0,
                  'floor') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'ceil') <=
                  states('sensor.master_bedroom_temperature')|round(0, 'floor')
                  }}
        sequence:
          - if:
              - condition: template
                value_template: >-
                  {{ state_attr('climate.ecobee', 'equipment_running') ==
                  'compCool1,fan' }}
            then:
              - device_id: 17f1237c78a7fe66e862444c1419ed20
                domain: cover
                entity_id: 4a787418abbf51c5b5d5278e356acf5a
                type: set_tilt_position
                position: 100
              - device_id: fee8098b53d00382da374b6eb53237ba
                domain: cover
                entity_id: 10f054161df2bd91318f7dd8c0d96e46
                type: set_tilt_position
                position: 100
              - device_id: 85d97da3e4b53ac396103826c33cccc9
                domain: cover
                entity_id: b99e3fc85c05ad53e976c65e53c4167f
                type: set_tilt_position
                position: 100
              - device_id: 995c6caacc583617bf718569ad60d364
                domain: cover
                entity_id: 85146117e86dbb53f339f904046215f6
                type: set_tilt_position
                position: 100
      - conditions:
          - condition: and
            conditions:
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'ceil') >=
                  states('sensor.living_room_temperature')|round(0, 'floor') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.office_temperature')|round(0, 'ceil') >=
                  states('sensor.master_bedroom_temperature')|round(0, 'floor')
                  }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'ceil') >= states('sensor.living_room_temperature')|round(0,
                  'floor') }}
              - condition: template
                value_template: >-
                  {{ states('sensor.upstairs_bedroom_temperature')|round(0,
                  'ceil') >=
                  states('sensor.master_bedroom_temperature')|round(0, 'floor')
                  }}
        sequence:
          - if:
              - condition: template
                value_template: >-
                  {{ state_attr('climate.ecobee', 'equipment_running') ==
                  'auxHeat1,fan' }}
            then:
              - device_id: 17f1237c78a7fe66e862444c1419ed20
                domain: cover
                entity_id: 4a787418abbf51c5b5d5278e356acf5a
                type: set_tilt_position
                position: 100
              - device_id: fee8098b53d00382da374b6eb53237ba
                domain: cover
                entity_id: 10f054161df2bd91318f7dd8c0d96e46
                type: set_tilt_position
                position: 100
              - device_id: 85d97da3e4b53ac396103826c33cccc9
                domain: cover
                entity_id: b99e3fc85c05ad53e976c65e53c4167f
                type: set_tilt_position
                position: 100
              - device_id: 995c6caacc583617bf718569ad60d364
                domain: cover
                entity_id: 85146117e86dbb53f339f904046215f6
                type: set_tilt_position
                position: 100
mode: single

Does this look like it’ll work better or is there a much better way to go about what I am trying to do?

That can be simplified a lot… There’s little point in using templates if you’re just going to list every possible combination. Every time you use states(...) the value is recalculated. You can reduce the number of calculations that your automation needs to do by using variables to hold those values.

You have 4 “greater” triggers. When considered together, they answer one question “Is the warmest upstairs room warmer than the coldest downstairs room?”. No matter what the room temperatures are, if the answer to that is “Yes”, one of your 4 “greater” templates is true. So that’s how the template trigger can be efficiently designed. The same concept works for the 4 “lesser” triggers as well.

I’m not 100% sure what your goal was with all the rounding up and down. If the goal was to make it more reliable or less reactive, I think you will be better off “de-bouncing” the triggers by defining a duration with the for configuration key.

description: ""
trigger_variables:
  office: 'sensor.office_temperature'
  living: 'sensor.living_room_temperature'
  master: 'sensor.master_bedroom_temperature'
  upstairs: 'sensor.upstairs_bedroom_temperature'
trigger:
  - alias: The coldest upstairs room is cooler than the warmest downstairs room
    platform: template
    value_template: |
      {{ min(states(office)| float(0), states(upstairs)| float(0)) <= 
      max(states(living)| float(0), states(master)| float(0)) }}
    for: "00:00:30"
    id: cooler
  - alias: The warmest upstairs room is warmer than the coldest downstairs room
    platform: template
    value_template: |
      {{ max(states(office)| float(0), states(upstairs)| float(0)) >= 
      min(states(living)| float(0), states(master)| float(0)) }}
    for: "00:00:30"
    id: warmer
  - platform: state
    entity_id: climate.ecobee
    attribute: equipment_running
    to: fan
condition:
  - alias: Only check the Actions if the HVAC is running
    condition: template
    value_template: "{{ running in ['fan', 'compCool1,fan', 'auxHeat1,fan'] }}"
action:
  - choose:
      - conditions:
          - or:
              - condition: template
                value_template: "{{ running == 'compCool1,fan' and trigger.id == 'warmer' }}"
              - condition: template
                value_template: "{{ running == 'auxHeat1,fan' and trigger.id == 'cooler' }}"
        sequence:
          - service: cover.set_cover_tilt_position
            target:
              entity_id: "{{ entities }}"
            data:
              tilt_position: 0
      - conditions:
          - or:
              - condition: template
                value_template: "{{ running == 'compCool1,fan' and trigger.id == 'cooler' }}"
              - condition: template
                value_template: "{{ running == 'auxHeat1,fan' and trigger.id == 'warmer' }}"
        sequence:
          - service: cover.set_cover_tilt_position
            target:
              entity_id: "{{ entities }}"
            data:
              tilt_position: 100
    default:
      - service: cover.set_cover_tilt_position
        target:
          entity_id: "{{ entities }}"
        data:
          tilt_position: 50
variables:
  running: "{{ state_attr('climate.ecobee', 'equipment_running') }}"
  entities: |-
    {{ ['4a787418abbf51c5b5d5278e356acf5a', '10f054161df2bd91318f7dd8c0d96e46',
    'b99e3fc85c05ad53e976c65e53c4167f', '85146117e86dbb53f339f904046215f6'] }}
mode: single

EDIT: Changed entities variable to templated list.

For an even more compact version, use a variable to get rid of the Choose
description: ""
trigger_variables:
  office: 'sensor.office_temperature'
  living: 'sensor.living_room_temperature'
  master: 'sensor.master_bedroom_temperature'
  upstairs: 'sensor.upstairs_bedroom_temperature'
trigger:
  - alias: The coldest upstairs room is cooler than the warmest downstairs room
    platform: template
    value_template: |
      {{ min(states(office)| float(0), states(upstairs)| float(0)) <= 
      max(states(living)| float(0), states(master)| float(0)) }}
    for: "00:00:30"
    id: cooler
  - alias: The warmest upstairs room is warmer than the coldest downstairs room
    platform: template
    value_template: |
      {{ max(states(office)| float(0), states(upstairs)| float(0)) >= 
      min(states(living)| float(0), states(master)| float(0)) }}
    for: "00:00:30"
    id: warmer
  - platform: state
    entity_id: climate.ecobee
    attribute: equipment_running
    to: fan
condition:
  - alias: Only check the Actions if the HVAC is running
    condition: template
    value_template: "{{ running in ['fan', 'compCool1,fan', 'auxHeat1,fan'] }}"
action:
  - service: cover.set_cover_tilt_position
    target:
      entity_id:
        - 4a787418abbf51c5b5d5278e356acf5a
        - 10f054161df2bd91318f7dd8c0d96e46
        - b99e3fc85c05ad53e976c65e53c4167f
        - 85146117e86dbb53f339f904046215f6'
    data:
      tilt_position: "{{ position }}"
variables:
  running: "{{ state_attr('climate.ecobee', 'equipment_running') }}"
  position: |
    {% if (running == 'compCool1,fan' and trigger.id == 'warmer') or 
    (running == 'auxHeat1,fan' and trigger.id == 'cooler')%}
      0
    {% elif (running == 'compCool1,fan' and trigger.id == 'cooler') or 
    (running == 'auxHeat1,fan' and trigger.id == 'warmer') %}
      100
    {% else %} 50 {% endif %}
mode: single

Wow…mine was overly messy and complicated. I just enabled your code into a new automation to test it.

The entities variables and entity_id would not work for some reason, kept telling me that there was an error with data missing so I used the visual editor and added all the vent devices to it that way. So far, my fan just started to circulate and I heard the vents go from 100% to 50% (I manually set them to 100% before enabling the automation) so that’s promising! I will update you later if the heating/cooling part worked. But even if it didn’t you helped me IMMENSELY and I really, really appreciate it! Thank you!

Edit: Tried again with your edit to the variables and I am getting this message: Message malformed: required key not provided @ data['entity_id']

This is what my YAML looks like when I add it manually:

            data:
              tilt_position: 100
            target:
              device_id:
                - 17f1237c78a7fe66e862444c1419ed20
                - 995c6caacc583617bf718569ad60d364
                - 85d97da3e4b53ac396103826c33cccc9
                - fee8098b53d00382da374b6eb53237ba

Sorry, I left out the entity_id when I changed the “fan” trigger to a State trigger… I’ve fixed it above.

After doing more testing and trial/error, this is the automation I came up with that is doing exactly what I want. Note: The “heat_cool” parts I just added so I might need to tweak those even though I rarely use the “heat_cool” mode on the ecobee. I couldn’t get the code you gave me to work even after changing some things. The automation would only trigger once and I want the vents to always change if at ANY point, the temperature meets the criteria set in the triggers. I appreciate all the help and I definitely wouldn’t have been able to get this to work without you doing basically most of the work so thank you very much!

alias: Climate Control 5
description: ""
trigger:
  - platform: template
    value_template: >-
      {{ min(states('sensor.office_temperature') | float(0),
      states('sensor.upstairs_bedroom_temperature') | float(0)) >
      min(states('sensor.living_room_temperature') | float(0),
      states('sensor.master_bedroom_temperature') | float(0)) }}
  - platform: template
    value_template: >-
      {{ max(states('sensor.office_temperature') | float(0),
      states('sensor.upstairs_bedroom_temperature') | float(0)) <
      max(states('sensor.living_room_temperature') | float(0),
      states('sensor.master_bedroom_temperature') | float(0)) }}
  - platform: template
    value_template: >-
      {{ max(states('sensor.office_temperature') | float(0),
      states('sensor.upstairs_bedroom_temperature') | float(0)) <
      min(states('sensor.living_room_temperature') | float(0),
      states('sensor.master_bedroom_temperature') | float(0)) }}
  - platform: template
    value_template: >-
      {{ min(states('sensor.office_temperature') | float(0),
      states('sensor.upstairs_bedroom_temperature') | float(0)) >
      max(states('sensor.living_room_temperature') | float(0),
      states('sensor.master_bedroom_temperature') | float(0)) }}
condition: []
action:
  - if:
      - condition: or
        conditions:
          - condition: template
            value_template: >-
              {{ states('climate.ecobee') == 'cool' and
              max(states('sensor.office_temperature') | float(0),
              states('sensor.upstairs_bedroom_temperature') | float(0)) <
              min(states('sensor.living_room_temperature') | float(0),
              states('sensor.master_bedroom_temperature') | float(0)) }}
          - condition: template
            value_template: >-
              {{ states('climate.ecobee') == 'heat' and
              min(states('sensor.office_temperature') | float(0),
              states('sensor.upstairs_bedroom_temperature') | float(0)) >
              max(states('sensor.living_room_temperature') | float(0),
              states('sensor.master_bedroom_temperature') | float(0)) }}
          - condition: template
            value_template: >-
              {{ states('climate.ecobee') == 'heat_cool' and
              min(states('sensor.office_temperature') | float(0),
              states('sensor.upstairs_bedroom_temperature') | float(0)) >
              max(states('sensor.living_room_temperature') | float(0),
              states('sensor.master_bedroom_temperature') | float(0)) + 1 }}
          - condition: template
            value_template: >-
              {{ states('climate.ecobee') == 'heat_cool' and
              max(states('sensor.office_temperature') | float(0),
              states('sensor.upstairs_bedroom_temperature') | float(0)) <
              min(states('sensor.living_room_temperature') | float(0),
              states('sensor.master_bedroom_temperature') | float(0)) - 1 }}
    then:
      - service: cover.set_cover_tilt_position
        data:
          tilt_position: 100
        target:
          device_id:
            - 995c6caacc583617bf718569ad60d364
            - 85d97da3e4b53ac396103826c33cccc9
            - 17f1237c78a7fe66e862444c1419ed20
            - fee8098b53d00382da374b6eb53237ba
    else:
      - service: cover.set_cover_tilt_position
        data:
          tilt_position: 0
        target:
          device_id:
            - 995c6caacc583617bf718569ad60d364
            - fee8098b53d00382da374b6eb53237ba
            - 85d97da3e4b53ac396103826c33cccc9
            - 17f1237c78a7fe66e862444c1419ed20
mode: restart