Send Web UI persistent notifications to Mobile Devices
Description​
This blueprint enables to send Web UI persistent notifications, (ie. the ones created with the persistent_notification.create
service) to the specified mobile device or device group. It also provides the option to choose which notifications must be forwarded, based on the provided notification ID.
Working both on iOS and Android devices, mobile notifications can then be organized into a specific group. For Android devices, they can also be assigned to a specific channel (for applying custom notification settings such as sound, vibration, etc.).
This blueprint can be useful in all situations when a web interface persistent notification is desired but the event should be reported also on a mobile device.
Moreover, it can be handy in scenarios when a notification cannot be sent directly to a mobile device, for example for system generated persistent notifications (invalid login attempts, integration setup required, supervisor alerts, etc.) and for integrations/addons which, instead of providing a custom event for triggering automations, use the persistent_notification.create
service as an event report mechanism.
Once opened on the mobile device, the relative persistent notification in the web UI is not dismissed.
Requirements​
Persistent Notification Integration
RequiredYou must have this integration enabled on your system to run the automation, since the notifications on the web interface are generated by this integration. This should be activated by default so unless you tweaked the default configuration you're good to go.
Mobile App Integration
RequiredThis integration provides the service to send notification to mobile devices. This should be activated by default so unless you tweaked the default configuration you're good to go.
Home Assistant Companion App
RequiredThe official mobile app for Home Assistant. Make sure to have the Home Assistant Companion App installed and configured on mobile devices you plan to use for this automation.
Notify Group Integration
RequiredIf you want to simultaneously send the notification to multiple devices, you can define a notification group using this integration in your configuration.yaml
, then provide the service for the notification group in the Mobile devices notification service input. This integration should be enabled by default. More on how to setup notification groups in the official docs.
Inputs​
The notification ID of persistent notifications which must be sent to mobile devices. Empty for all notifications. This allows to filter notifications based on their ID before it gets created on the mobile device. For example, if you want to receive notifications on your mobile device for all invalid login attempts, you could set this input to `http-login`, the ID of such persistent notifications.
The notification service for mobile devices (eg. service.mobile_app_<your_device_id_here>). You can provide both a notify group or a single notify device here.
Replace existing notifications with the same notification ID.
Android notification channel. Allows to group notifications to then apply custom settings for sound, vibration, etc. Leave blank if you do not want to use this feature.
Notification group for the notifications sent with this automation. Use this to group notifications in the notification tray. Leave blank if you do not want to use this feature.
Additional Notes​
Please be aware that if you use notification groups which include both iOS and Android devices, some features (like Android Channels and notification groups) don't work. More details in the Home Assistant Companion App Docs
Changelog​
- 2021-02-01: first blueprint version 🎉
- 2021-10-26: Standardize blueprints structure and inputs naming across the whole collection. Improve blueprint documentation. No functionality change.