This is a Home assistant custom integration, It allows you to send notifications to all mobile devices of a person at once and display notifications on a custom Lovelace card, and supports the configuration of multi-person exclusive notification card.
Thanks to Mark Wu for some ideas and tests.
Tip
If you keep getting notifications for old pictures or videos, please see here.
Tip
If you encounter a bug during use,
please enable debug mode in the integration and try the original operation,
then open issues and post the log.
-
It is recommended to use HACS to install. If you want to install manually,
please put the notifyhelper folder in custom_components folder,
and restart Home assistant. -
After the restart is completed, search for notifyhelper in the integration and set it up:
Tip
Only 100 notifications can be saved.
If more than 100 notifications are stored,
they will be deleted starting from the oldest one.
- The method of calling the service is similar to the built-in notify.mobile_app service.
The following is an automation example:
alias: test1
description: ""
triggers:
- trigger: event
event_type: ""
conditions: []
actions:
- sequence:
- action: notify.notify_person
data:
title: Test Notification
message: This is a test message.
targets:
- person.you
- person.other
color:
data:
image: /local/icon.png
mode: single
Important
The iOS badge is automatically configured and requires no manual setup. The URL can be specified during integration setup, but any URL defined in automation will override the default.
Tip
targets: must be a list.
color: Optional, specify the message color please fill in Hex rgb,
the default is None.
data: Optional, Refer to HA doc.
- The data parameters accepted by Android and ios are different, if you want to set them separately, you can add ios and android to the data.
The following is an automation example:
alias: test1
description: ""
triggers:
- trigger: event
event_type: ""
conditions: []
actions:
- sequence:
- action: notify.notify_person
data:
title: Test Notification
message: This is a test message.
targets:
- person.you
- person.other
color:
data:
ios:
image: /local/icon.png
push:
sound:
name: US-EN-Morgan-Freeman-Roommate-Is-Arriving.wav
volume: 0.3
critical: 1
android:
image: /local/icon.png
mode: single
Tip
If the set parameters are all universal,
you can use the first example without adding ios and android.
You can send different photos or videos for ios and android but the notification will only save one of them, please be aware of this.
- Lovelace card configuration:
type: custom:notifications-card
person_name: // yourname, e.g.:John
font_size: optional // text size, default 16px
line_height: optional // line spacing ratio, default 1.0
Important
Starting from version 2.3.1, please use it with notifications-card.
- Button card configuration:
show_name: true
show_icon: true
type: button
tap_action:
action: perform-action
perform_action: notifyhelper.read
target: {}
data:
targets:
- person.you
entity: input_button.read
Tip
targets: must be a list.
Note
You don’t necessarily need to create a button card to mark notifications as read.
You can also use automation to call the service.
The same applies to clear notifications.
Please configure it according to your personal needs.