Understanding the action CHOOSE

I have an automation which enable my airconditioning on several triggers.

As an action I have Choose and 5 options.
But will every pad be followed when all conditions are true or only the first option that have all conditions true?

I want to know for example. The temperature in all area’s is 25° but there is not enough solar production than the automation will not run.
But later on the day the automation will be triggered because there is enough solar production. Will only the first option run or will all options run that have all conditions to true?

This is my automation:

alias: Airco inschakelen per kamer
description: Airco inschakelen bij bereiken ingestelde temperatuur
triggers:
  - entity_id:
      - sensor.tvoc_living_temperature_sensor
    above: 24
    id: Living te warm
    trigger: numeric_state
  - entity_id:
      - sensor.tvoc_slaapkamer_temperature_sensor
    above: 24
    id: Slaapkamer te warm
    trigger: numeric_state
  - trigger: numeric_state
    entity_id:
      - sensor.temperatuur_logeerkamer
    above: 24
    id: Logeerkamer te warm
  - entity_id:
      - sensor.temperatuur_zolder
    above: 24
    id: Zolder te warm
    enabled: true
    trigger: numeric_state
  - entity_id:
      - input_boolean.slapen
    to: "off"
    id: Opstaan
    from: "on"
    trigger: state
  - trigger: state
    entity_id:
      - input_boolean.slapen
    from: "off"
    to: "on"
    id: Slapen
  - trigger: numeric_state
    entity_id:
      - sensor.smartmeter_huidige_teruglevering
    for:
      hours: 0
      minutes: 5
      seconds: 0
    above: 1500
    id: Voldoende teruglevering
  - trigger: numeric_state
    entity_id:
      - sensor.smartmeter_huidige_teruglevering
    for:
      hours: 0
      minutes: 5
      seconds: 0
    below: 1
    id: Onvoldoende teruglevering
conditions:
  - condition: state
    entity_id: input_boolean.airco_modus
    state: "on"
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - Opstaan
              - Living te warm
              - Voldoende teruglevering
          - condition: numeric_state
            entity_id: sensor.tvoc_living_temperature_sensor
            above: 24
          - condition: state
            entity_id: input_boolean.slapen
            state: "off"
          - condition: numeric_state
            entity_id: sensor.smartmeter_huidige_teruglevering
            above: 1500
        sequence:
          - data:
              hvac_mode: cool
              temperature: 22
            target:
              entity_id:
                - climate.living_room_temperature
            action: climate.set_temperature
        alias: Airco living aanzetten
      - conditions:
          - condition: trigger
            id:
              - Opstaan
              - Slaapkamer te warm
              - Voldoende teruglevering
          - condition: numeric_state
            entity_id: sensor.tvoc_slaapkamer_temperature_sensor
            above: 24
          - condition: state
            entity_id: input_boolean.slapen
            state: "off"
          - condition: numeric_state
            entity_id: sensor.smartmeter_huidige_teruglevering
            above: 1500
        sequence:
          - data:
              hvac_mode: cool
              temperature: 20
            target:
              entity_id:
                - climate.slaapkamer_room_temperature
            action: climate.set_temperature
        alias: Airco slaapkamer aanzetten
      - conditions:
          - condition: trigger
            id:
              - Opstaan
              - Logeerkamer te warm
              - Voldoende teruglevering
          - condition: numeric_state
            entity_id: sensor.temperatuur_logeerkamer
            above: 24
          - condition: state
            entity_id: input_boolean.slapen
            state: "off"
          - condition: numeric_state
            entity_id: sensor.smartmeter_huidige_teruglevering
            above: 1500
        sequence:
          - data:
              hvac_mode: cool
              temperature: 20
            target:
              entity_id:
                - climate.logeerkamer_room_temperature
            action: climate.set_temperature
        alias: Airco logeerkamer aanzetten
      - conditions:
          - condition: trigger
            id:
              - Opstaan
              - Zolder te warm
              - Voldoende teruglevering
          - condition: numeric_state
            entity_id: sensor.temperatuur_zolder
            above: 24
          - condition: state
            entity_id: input_boolean.slapen
            state: "off"
          - condition: numeric_state
            entity_id: sensor.smartmeter_huidige_teruglevering
            above: 1500
        sequence:
          - data:
              hvac_mode: cool
              temperature: 18
            target:
              entity_id:
                - climate.zolder_room_temperature
            action: climate.set_temperature
        alias: Airco zolder aanzetten
      - conditions:
          - condition: trigger
            id:
              - Slapen
              - Onvoldoende teruglevering
        sequence:
          - action: script.alle_aircos_uit
            metadata: {}
            data: {}
mode: queued
max: 10

Please use code blocks to post code.

image

1 Like

You may find using the generic thermostat just a bit easier :slight_smile:

The output of the condition block should be true.
If you have multiple conditions, all of them should be true so output can be true (AND operator by default)

You can put OR operator and nest multiple conditions underneath, if at least one of them is true, condition will be true.

Source: Script Syntax - Home Assistant

Each sequence is paired with a list of conditions. 
(See the conditions page for available options and how multiple conditions are handled.) 
The first sequence whose conditions are all true will be run. 
An optional default sequence can be included which will be run only if none of the sequences from the list are run.