Repeat until - does it wait for the condition to update?

Hello,

I have the following automation action code:

repeat:
  sequence:
    - action: mqtt.publish
      metadata: {}
      data:
        qos: "0"
        topic: >-
          application/39ab8-e1/device/a84/command/down
        payload: >-
          {"devEui":"a84", "confirmed":true, "fPort":1,
          "data":"AwER"}
      enabled: true
    - delay:
        hours: 0
        minutes: 0
        seconds: 8
        milliseconds: 0
  until:
    - condition: state
      entity_id: sensor.relay1sack
      state: "True"
enabled: true

I just want to make sure I have this right : when triggered, the code will :
i. Execute the first action step ie. publish mqtt payload
ii. Wait for 8 seconds
iii. Then look to see if sensor.relay1sack updates to “True” - If yes, then the sequence stops. If no, the sequence continues.

What confuses me is step iii. What if sensor.relay1sack is already “True” prior to the sequence having been triggered - will the code then not repeat the sequence? Or will it repeat the sequence until sensor.relay1sack updates to true once again?

Thanks

Unlike triggers, conditions do not require the state to change. They are evaluated at the time they are called.

https://www.home-assistant.io/docs/scripts#repeat-until

So your sequence always runs at least once. It will not repeat a second time if the conditions are true before the sequence starts.

As opposed to:

https://www.home-assistant.io/docs/scripts#while-loop

Where the sequence will not run (even once) if the conditions are false before the sequence starts.

I see. That clears things. Thanks.