Repeating notifications on android app

Hi,

I’m trying to get ‘rich’, repeating notifications on Android when my smoke sensor detects fire.
Using the notifications service in developer tools I can send a notification with custom title, message and color:

message: Fire!
subject: Oh crap!
data:
  color: red

Exactly what I need since I want a clear red color indicating a serious alert and I want a subject where I can immediately see which of my smoke detectors is detecting fire (upstairs/downstairs/…)

Since this is a serious problem I want this notification to be repeating. So after some research I found the Alert integration. I have this working perfectly except I know loose the ability to add color and subject to my notification. I hoped the ‘data’ config variable would allow me to pass the message data as the docs stated but this does not seem to work.
So what I have now, combining notify and alert is the following yaml in my config:

alert:
  fire:
    name: Fire detected!
    done_message: Ending fire alert.
    entity_id: input_boolean.fire #TODO replace with actual smoke sensor
    state: "on"
    repeat: 5
    can_acknowledge: true
    skip_first: false
    data:
      message: "Your message goes here"
      title: "Custom subject"
      data:
        color: red
    notifiers:
      - mobile_app_phone_selem

Unfortunately, the data variable I added seems to do nothing at all. I just get a standard blue notification with the name specified in the alert (‘Fire detected!’) but not my title, message or color.

I can’t find any more info on this so I’m hoping someone can tell me if I’m doing something wrong or if this is just not supported…

Thanks in advance!

Try this:

alert:
  fire:
    name: Fire detected!
    done_message: Ending fire alert.
    entity_id: input_boolean.fire #TODO replace with actual smoke sensor
    title: "Custom subject"
    state: "on"
    repeat: 5
    can_acknowledge: true
    skip_first: false
    data:
      color: red
    notifiers:
      - mobile_app_phone_selem

The title is defined on the same level as done_message etc… The name is the message for the alert and done_message is the message when the alert stopped. You also don’t need to have a data: block inside the data: block for the alert.

1 Like

Thank you! Can’t believe I missed that, I should have seen this. I’ll blame the late hour yesterday… :slight_smile: Anyway, I have it working now.
In case others are facing the same problem: naturally you can also add the ‘message’ variable on the same level as title if you also want a custom notification subject.