#Logging of persistent notifications

1 messages · Page 1 of 1 (latest)

eager edge
#

I've had help on this before and thought it worked, but apparently not. I would like all persistent notifications to be logged to a .txt file, preferably with an empty line between each log. I've created a file integration, an automation and referenced the file integration, as well as created the actual file.
Why doesn't this work?

alias: Record every persistent notification to .txt file
description: ""
triggers:
  - trigger: event
    event_type: call_service
    event_data:
      domain: persistent_notification
      service: create
conditions: []
actions:
  - action: notify.send_message
    metadata: {}
    data:
      message: >-
        {{ now().strftime('%Y-%m-%d %H:%M:%S') }} - {{
        trigger.event.data.service_data.title }} / {{
        trigger.event.data.service_data.message }}
    target:
      entity_id: notify.persistent_to_txt
mode: single
eager edge
#

Sorry, forgot all about this

#
alias: Send persistent notification til .txt fil v2 291124
description: ""
triggers:
  - trigger: persistent_notification
    update_type:
      - added
conditions: []
actions:
  - action: notify.send_message
    metadata: {}
    data:
      message: >-
        {{ now().strftime('%Y-%m-%d %H:%M:%S') }} - {{
        trigger.event.data.service_data.title }} / {{
        trigger.event.data.service_data.message }}
    target:
      entity_id: notify.persistent_to_txt
mode: single

Now i did this

#

But it produces this error

dapper yoke
#

It's not an event. You have to use the linked trigger variables