Hi you all. :)
I have an automation which is triggered by a mobile_app_notification_action, so, a 'button' in a notification that I sent to multiple devices in another script. Now my automation handles the event that someone, on one of these devices, pressed the button. This works fine ofc, but I also want to send a little confirmation message, replacing the original notification.
The problem: I can't determine which device I want to send a confirmation message to. All I seem to have is a device_id or the trigger.context to work with, but I can't tie that to any notify.mobile_app_* service.
I tried
action: notify.send_message
target:
device_id: dba5de5bf7f34593
# Error: Referenced devices dba5de5bf7f34593 are missing or not currently available
``` without success.
I used the `context.user_id` to figure out the person's name
```yaml
{{ (states.person|selectattr('attributes.user_id','eq',trigger.event.context.user_id)|first).attributes.friendly_name | title }}
``` and tried to do something similar with the notify service, but couldn't figure it out yet. Can someone help?