Wait Until (in actions) - AND or OR / Condition already met?

Hello,

I’m trying to setup automation to trigger my pool pump after 7AM when I have >2kw solar generation or >20% battery.

  • My trigger is the time, with a wait condition in the ACTIONS for either of those two criteria OR until 90 minutes has passed.
  • Having issues with the configuration where, if one of the conditions is TRUE (>20% battery) it continues to wait.

So my question is, if the WAIT UNTIL (in ACTIONS) has two conditions is it an OR or AND? Also if one of the conditions is already TRUE would it trigger immediately or should I add an IF before the WAIT to trigger it that way in that scenario?

Interestingly when I did a trace I saw it only testing for one of the two triggers?

wait_for_trigger:
  - trigger: numeric_state
    entity_id:
      - sensor.my_home_percentage_charged
    above: 15
  - trigger: numeric_state
    entity_id:
      - sensor.my_home_solar_power
    above: 2.5
timeout:
  hours: 0
  minutes: 30
  seconds: 0
  milliseconds: 0

Result

February 21, 2025 at 6:55:00 AM
Executed: February 21, 2025 at 6:55:00 AM
Result:
result: false
state: 0.225
wanted_state_above: 2.5

Full YAML

alias: Pool Morning
description: ""
triggers:
  - trigger: time
    at: "06:55:00"
conditions: []
actions:
  - wait_for_trigger:
      - trigger: numeric_state
        entity_id:
          - sensor.my_home_percentage_charged
        above: 15
      - trigger: numeric_state
        entity_id:
          - sensor.my_home_solar_power
        above: 2.5
    timeout:
      hours: 0
      minutes: 30
      seconds: 0
      milliseconds: 0
  - device_id: cb0c8c3bca1294b599b05f4ef0f341c7
    domain: select
    entity_id: 9b73b21ae8830689c14cda922207689a
    type: select_option
    option: Manual
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - if:
      - condition: state
        entity_id: binary_sensor.pool_pump_status
        state: "on"
    then:
      - action: notify.xxx
        metadata: {}
        data:
          title: xxx
          message: Pool start success
    else:
      - action: notify.xxx
        metadata: {}
        data:
          message: Failure pool
          title: xxx
  - delay:
      hours: 1
      minutes: 28
      seconds: 0
      milliseconds: 0
  - device_id: cb0c8c3bca1294b599b05f4ef0f341c7
    domain: select
    entity_id: 9b73b21ae8830689c14cda922207689a
    type: select_option
    option: "Off"
  - delay:
      hours: 0
      minutes: 2
      seconds: 0
      milliseconds: 0
  - if:
      - condition: state
        entity_id: binary_sensor.pool_pump_status
        state: "off"
    then:
      - action: notify.xxx
        metadata: {}
        data:
          title: xxx
          message: Pool stop success
    else:
      - action: notify.xxx
        metadata: {}
        data:
          message: Failure pool stop
          title: xxx
mode: single

They behave as OR, just like all other triggers.

No, there must be an event of it changing to TRUE during the wait.

Roger that, I’ll add a condition at the start then to handle this thank you.