Hi all - I’m struggling to clear an android notification when I click the notification button. It uses the URI action to take me to a lovelace dashboard, but when I test the automation, it doesn’t clear.
- service: notify.notify
data:
message: |-
{{ expand('light.lights')
| selectattr('state', 'eq', 'on')
| map(attribute='name')
| list
| join (', ')
}}
title: Lights On For 30 Mins+
data:
ttl: 0
priority: high
actions:
- action: URI
title: Open Lights Dashboard
uri: /lovelace-mushroom/lightson
tag: lights-on
- wait_for_trigger:
- platform: event
event_type: mobile_app_notification_action
event_data:
action: URI
- service: notify.notify
data:
message: clear_notification
data:
ttl: 0
priority: high
tag: lights-on
I think the issue is the ‘wait for trigger’ section, as the notification fired and immediately dismissed when I removed this. What’s wrong with this section - I have a similar notification with this logic (for closing the garage door) that works, so a bit confused!
Thanks