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