I want to forward persistent notifications to the iOS companion app. I created the following automation:
alias: forward persistent notification to companion app
description: ""
trigger:
- platform: state
entity_id: sensor.persistent_notifications
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: |
{{ trigger.from_state and trigger.to_state and
trigger.to_state.state | int > trigger.from_state.state | int }}
sequence:
- service: notify.mobile_app
metadata: {}
data:
message: new message in Home Assistant
data:
push:
badge: "{{ trigger.to_state.state | int }}"
alias: new message
- conditions:
- condition: template
value_template: |
{{ trigger.from_state and trigger.to_state and
trigger.to_state.state | int < trigger.from_state.state | int }}
sequence:
- service: notify.mobile_app
metadata: {}
data:
message: delete_alert
data:
push:
badge: "{{ trigger.to_state.state | int }}"
alias: message removed
mode: single
Is there a way to get the title and message of the persistent notification so I can forward it to the iOS companion app?