Skip to content

Instantly share code, notes, and snippets.

@nikolaykasyanov
Last active July 8, 2025 20:33
Show Gist options
  • Save nikolaykasyanov/2c786bdf093758f8905472dee60bcae9 to your computer and use it in GitHub Desktop.
Save nikolaykasyanov/2c786bdf093758f8905472dee60bcae9 to your computer and use it in GitHub Desktop.
Home Assistant automation to send persistent notifications to the Home Assistant Companion app
alias: "System Notifications"
description: "Sends persistent notifications to the companion app"
triggers:
- trigger: persistent_notification
update_type:
- added
- removed
- updated
notification_id: ""
conditions: []
actions:
- action: notify.mobile_app_john_does_phone
metadata: {}
data:
message: |-
{% if trigger.update_type == "removed" %}
clear_notification
{% else %}
{{ trigger.notification.message }}
{% endif %}
title: |-
{% if trigger.update_type != "removed" %}
{{ trigger.notification.title }}
{% endif %}
data:
group: ha-persistent
tag: "{{ trigger.notification.notification_id }}"
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment