Notification repeats and priority

Hello,

I would like to create a notification that repeats itself as long as the state is active.

Like with a smoke or water alarm, i should keep repeating until the status is back to normal again.

Example i have:

---
#
# Send Notification if a Water Leak is Detected
#

id: '2802202319581'
alias: Security - Water Sensor Leak Detected
description: Send Notification when a Water Leak is Detected. 

trigger:
  - platform: state
    entity_id:
      - sensor.water_sensor_pro_cv_ketel_sensor_status
    from: idle
    to: Water leak detected
    for:
      hours: 0
      minutes: 0
      seconds: 5

condition:
  - condition: state
    entity_id: binary_sensor.water_sensor_pro_cv_ketel_water_leak_detected
    state: "on"

action:
  - service: notify.all_phones
    data:
      title: Waterlek Gedetecteerd!
      message: Waterlek gedetecteerd in de Kelder.
      data:
        importance: high 
        channel: "Security"

mode: single

I was lookig at the mode setting, but i do not understand how it works.

Also, none of the phones gets the notifications in time, the only come when i use the phone.
Is there a fix for this?

You probably need to look at the battery management options on the phone.
Make sure the app is not battery optimized and is allowed to run in background or when the phone is in sleep.

Regarding looping? Do you want the same message to be sent over and over again?

We checked all the battery settings, HA excluded from sleep modes, even can ignor the DND. Does not get closed and can use unlimited battery.

I really have no idea anymore.

Yes, it shoud send the same over and over every xx minutes if the state is still active

Oh, thanks, i did not know about alerts :open_mouth:
But now is the question, when to use an Automation and when to use an Alert?
For water and smoke i see its an Alert.
but for example if my car is done charging, is it an alert of notification via automation?