Wait for trigger does not wait

Hi everyone,

I am using a wait for trigger in my automation to wait for the power consumption of my dishwasher to drop below a certain level. Today I noticed that the automation continued even though the power level did not drop below the threshold.
After looking at the trace timeline I’m a bit confused why the automation continued.

The step configuration for the wait for trigger looks as follow:

wait_for_trigger:
  - trigger: numeric_state
    entity_id:
      - sensor.power
    for:
      hours: 0
      minutes: 5
      seconds: 0
    below: 5
timeout:
  hours: 2
  minutes: 45
  seconds: 0
  milliseconds: 0

The changed variable tab in the trace timeline states that the step was completed even though some time is remaining:

context:
  id: 01JGX4XD8J1Y14Y2H7A8Q2QAJH
  parent_id: 01JGX4M89FSMHVRJPJNDQY33G0
  user_id: null
wait:
  remaining: 4736.971896583214
  completed: true
  trigger:
    id: '0'
    idx: '0'
    alias: null
    platform: numeric_state
    entity_id: sensor.power
    below: 5
    above: null
    from_state:
      entity_id: sensor.power
      state: '24'
      attributes:
        state_class: measurement
        unit_of_measurement: W
        device_class: power
        friendly_name: Verbrauch Geschirrspüler
      last_changed: '2025-01-06T07:51:24.297688+00:00'
      last_reported: '2025-01-06T07:51:24.297688+00:00'
      last_updated: '2025-01-06T07:51:24.297688+00:00'
      context:
        id: 01JGX9HQC929RXREE6WM74KBW2
        parent_id: null
        user_id: null
    to_state:
      entity_id: sensor.power
      state: '1'
      attributes:
        state_class: measurement
        unit_of_measurement: W
        device_class: power
        friendly_name: Verbrauch Geschirrspüler
      last_changed: '2025-01-06T07:51:27.295223+00:00'
      last_reported: '2025-01-06T07:51:27.295223+00:00'
      last_updated: '2025-01-06T07:51:27.295223+00:00'
      context:
        id: 01JGX9HT9Z4BESYZ16NXP7SCXK
        parent_id: null
        user_id: null
    for:
      __type: <class 'datetime.timedelta'>
      total_seconds: 300
    description: numeric state of sensor.power

At the time the automation continued the power consumption was below the threshold but only for a few seconds. Is my understanding of the wait for trigger correct that it should only continue once the power consumption is below 5 for the full 5 minutes even if there is a shorter period below the trigger before that?

wait.completed being true means that the trigger happened. If wait_for_trigger had reached the timeout, then wait.completed would’ve been false (also wait.remaining would’ve been 0 of course).