I am currently writing an automation that warns about upcoming weather events by sending a notification to my android/ios phone.
This all works great, but when clicking on the notification (not one of the action buttons, but just the notification text for example), then it just opens the home assistant app. I’d much rather have it open the more info dialogue of my weather card.
You can specify whatever URL you want to open, so this could be a dashboard that contains the weather info you want to see. On Android you can have it open the More Info dialog.
Can’t believe I couldn’t find this when searching thank you so much @michaelblight!
As this is only available on android: how would you go about creating graceful failure on iOS? We have both android and iOS devices and honestly I don’t want to add new devices any time something changes.
I’d like to just have a notify.notify action and have that take care of both iOS and Android.
I’m also planning to create a community blueprint on this and would therefore like to keep it as general as possible.
this is my current actions section:
actions:
- action: notify.notify
data:
message: "{{messages[weather_condition]}}"
title: "{{titles[weather_condition]}}"
data:
# platform-independent options
actions:
- action: thanks # setting an action that does nothing, but it clears the notification
title: Danke!
- action: "URI"
title: "Details"
uri: "entityId:{{weather_entity}}"
# android-only options
ttl: 0
priority: high
visibility: public
notification_icon: "{{icons[weather_condition]}}"
color: blue
clickAction: noAction
# ios-only options
url: # used as url for iOS, nothing defined here
metadata: {}
my blank “thanks” action does nothing, but when clicking it the notification gets dismissed → what I want.
But when clicking on “Details”, it does open the more info dialogue, but it does not dismiss the notification. any idea why that is and how to fix it?
data:
# platform-independent options
actions:
- action: thanks # setting an action that does nothing, but it clears the notification
title: Danke!
- action: "URI"
title: "Details"
uri: "entityId:{{weather_entity}}"