Hello,
Currently – I have an automation that sends me a mobile notification when the garage door is opened for 10 minutes.
I would like to get repeated notifications, and I think I should use ‘alert’ instead of automation.
I’m not sure how to specify the mobile notification inside the alert.
This is the code of the ‘action’ section that currently works perfectly in my automation:
service: notify.tal_adi
data:
message: Garage door is open
data:
ttl: 0
priority: high
channel: alarm_stream
This is how ‘tal_adi’ is configured (in the configuration.xml):
notify:
- name: Tal_Adi
platform: group
services:
- service: mobile_app_m2101k6g
- service: mobile_app_redmi_note_9_pro
I’m trying to use the ‘Alert’ example code, but I do not know how to integrate the mobile notification. What should I use as the notifier?
alert:
garage_door:
name: Garage is open
done_message: Garage is closed
entity_id: input_boolean.garage_door
state: "on"
repeat: 30
can_acknowledge: true
skip_first: true
notifiers:
- tal_adi
Thank you,
Tal.
The following is my config for a simillar use case which may help …
alert:
front_door_open:
name: "Front Door Open"
title: "Information - Front door open for excessive time at {{ states('sensor.time') }}"
message: "Check that the front door is properly closed."
entity_id: binary_sensor.front_door_open
state: 'on'
repeat: 60
can_acknowledge: true
skip_first: false
notifiers:
- info_group
This is the associated notify group:
notify:
- name: info_group
platform: group
services:
- service: mobile_app_sm_g970f
I have different groups setup for Information/Warning/Alert which represents the severity of the problem and is pre-fixed in the message title. A warning would be a system fault and an alert message would be something major like a water leak or the intruder alarm being activated.
You can add additional services to the nofity group e.g.
- service: persistent_notification
You can also add other notifer groups like email, Telegram etc.
Thank you so much for your reply.
This is working, but can you please tell me when can I add this:
data:
ttl: 0
priority: high
channel: alarm_stream
Hi, I think these are optional fields that you can include for Android notifications and this goes indented below the service:
keyword as shown below:
notify:
- name: alert_group
platform: group
services:
- service: mobile_app_sm_g970f
data:
ttl: 0
priority: high
color: red
channel: Alert
Full details can be found at the link below below but make sure you refer to the correct section (i.e. IOS or Android):