Water sensor constantly alerting as critical notifications

Hi team, first post here. I have a few automations set up, using the ‘leak detection and notifier’ which works great for all my water sensors, but doesnt have the right config.

basically what im looking to do is start with that, but set up a loop that resends notification every X minutes if sensor is still wet, as well as a critical on iOS (so i can get notified thru sleep focus).

Something like this should work.

- alias: "Leak Warning"
  id: 27ca305c-761c-4a91-9a65-d93463d76dfa
  trigger:
    platform: state
    entity_id: binary_sensor.water_leak_xs_sensor_water_leak_detected
    to: "on"
  action:
    - alias: "Repeat the sequence UNTIL true"
      repeat:
        sequence:
          - service: notify.mobile_app_iphone
            data:
              title: "Leak Warning"
              message: "{{ trigger.to_state.attributes.friendly_name }} has reported a leak"
              data:
                push:
                  sound:
                    name: default
                    critical: 1
                    volume: 1.0
          - delay:
              minutes: 5
        until:
          - condition: state
            entity_id: binary_sensor.water_leak_xs_sensor_water_leak_detected
            state: "off"

ill give that a shot. for testing purposes ill use a specific sensor, but is there a way to have a list of water sensors feed into it? i dont want to hard code every sensor into this or dupe this x number of times. thanks!

I think there is a way to do that if they all have a similar entity ID but I haven’t used it.

You don’t need to repeat the automation, you can add the entity_IDs to the trigger and final condition. Are you planning on enough leak sensors that a small list is an issue?

  trigger:
    platform: state
    entity_id: 
      - binary_sensor.one
      - binary_sensor.two
      - binary_ sensor.etc
    to: "on"

........

        until:
          - condition: state
            entity_id: 
              - binary_sensor.one
              - binary_sensor.two
              - binary_ sensor.etc
            state: "off"

no, just if i add a new sensor to the system and forget to update. ill give it a go, thx

getting a “Message malformed: extra keys not allowed @ data[‘0’]” error, updated sensor and iphone name.

copy/paste your config that is throwing that error here. Likely just a YAML formatting issue.