#Persistent notifications

1 messages · Page 1 of 1 (latest)

knotty pendant
#

Hey folks, I'm trying to figure out how to do persistent notifications with the companion app, but beginning to pull my hair out 🤣

The companion app supports a persistent: true flag, however, this is documented as broken as of Android 14.

No problem, I'll detect notification_cleared and resurface the notification -> Nope, the event doesn't seem to have a way to tell which device cleared the notification. It has a device_id, but this doesn't seem to be a home assistant device id.

No problem, I'll set a custom tag on each notification -> I'd have to hard code every device mobile_app name, there seems to be no way to traverse notify groups in Jinja2

Is there any way to achieve this?

latent relic
#

Persistent is broken indeed but it's unfixable as Android does not allow it anymore.

notification_cleared does have context the tells you which user cleared it. Could use a template to map trigger.to_state.context.user_id to the correct device. Of add make an event trigger per person and limit it to a single user.

knotty pendant
latent relic
#

Did you look into trigger.event.data? Maybe device is part of it....