Need help with automation for repeat

Hello,
Can anyone help me with my simple automation?

It should work as follows: while we hold the button down, the brightness of the light bulb decreases. When you release the button, there should be an exit from the cycle for bulb decreases.

The problem is that both triggers are triggered correctly, but there is no exit from the loop.

trigger:
  - device_id: 1325bb5efbf9d89d300915bda2e00255
    domain: zha
    platform: device
    type: remote_button_long_press
    subtype: dim_down
condition: []
action:
  - repeat:
      sequence:
        - device_id: 5e06fa7260f54a62376e213c126c6789
          domain: light
          entity_id: 92cdb31434e1ac4686f411a79a9e1aca
          type: brightness_decrease
        - wait_for_trigger:
            - device_id: 1325bb5efbf9d89d300915bda2e00255
              domain: zha
              platform: device
              type: remote_button_long_release
              subtype: dim_down
              id: "1"
          timeout:
            hours: 0
            minutes: 0
            seconds: 0
            milliseconds: 10
          continue_on_timeout: true
      until:
        - condition: trigger
          id: "1"
mode: single

Thank you!

I don’t know if this is actually possible without a proxy entity whose state you can monitor, and I don’t have any buttons that create release events to test this on…

However, a Wait for Trigger doesn’t populate the trigger variable, it has it’s own variable, wait.trigger. So you could try

      until:
        - condition: template
          value_template: "{{ wait.trigger is not none }}"