Leak Detection - Can't get to work

Trying to setup a basic leak detection and repeating alert.
Have a new Zooz leak detector and Zoor Siren. Have them added.
I setup the automation and w/o a repeat function, I can reliably get the 1-time Siren to work. But if I setup the automation to try to keep repeating the Siren message until the leak condition ends, it goes sideways. In fact, it seem to only actually siren until AFTER I remove the water trigger.

This is what the automation looks like. I don’t where this is setup wrong.
Any suggestions?

description: ""
triggers:
  - type: moist
    device_id: 6e993737194c3acb8db879ab67f290e2
    entity_id: fe74bd1eae1177d0c3222853e0d2d60c
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - repeat:
      until:
        - type: is_not_moist
          condition: device
          device_id: 6e993737194c3acb8db879ab67f290e2
          entity_id: fe74bd1eae1177d0c3222853e0d2d60c
          domain: binary_sensor
      sequence:
        - action: siren.turn_on
          metadata: {}
          target:
            device_id: cf02248fe93ae138056b11feb06e46fa
          data:
            volume_level: 0.7
mode: single

Please follow the Community Question Guidelines by posting your automation’s YAML configuration… it makes it a lot easier for us to see any possible issues that may be hard to spot in a screenshot of the UI Automation Editor.

One possible issue that I can see is that you may need a delay following the siren action to avoid collisions if the repeat is calling the action over-and-over again every few milliseconds.

Sorry. Fairly new to HA automation. I posted the YAML but it’s for each section of the automation. Not sure if that’s what was needed.

If you click the 3-dot/breadcrumbs icon in the top right corner in the Automation editor there is an option “Edit in YAML” which will show the whole thing all together.

I don’t see anything wrong in what you have posted. Did you try adding a Delay action?

Haven’t tried a delay action because I’m not sure WHERE in the logic to add it.
Updated the YAML code. Thanks for pointing out where I could get the whole block at once.

And again, the way this is currently behaving is that I see it triggered initially, but no siren. Then once I remove the water from the sensor, about 2sec later I get the siren message. Completely repeatable. Seems like it’s working backwards.

The delay needs to be inside the Repeat, after the siren action:

description: ""
triggers:
  - type: moist
    device_id: 6e993737194c3acb8db879ab67f290e2
    entity_id: fe74bd1eae1177d0c3222853e0d2d60c
    domain: binary_sensor
    trigger: device
conditions: []
actions:
  - repeat:
      until:
        - type: is_not_moist
          condition: device
          device_id: 6e993737194c3acb8db879ab67f290e2
          entity_id: fe74bd1eae1177d0c3222853e0d2d60c
          domain: binary_sensor
      sequence:
        - action: siren.turn_on
          metadata: {}
          target:
            device_id: cf02248fe93ae138056b11feb06e46fa
          data:
            volume_level: 0.7
        - delay: 1
mode: single

There we go! That fixed it perfectly!!! Thank you!!