Does anyone know if it’s possible to set a notification so when clicked (anywhere on the notification), it will open the Home Assistant App on a specific view (dashboard/tab/setting/whatever)?
Or can that only be achieved by making an actionable notification, where the action triggers a new automation that sends a command_webview notification (Notification Commands | Home Assistant Companion Docs)? Meaning it can’t be the “default” action for clicking anywhere on the notification?
Hey, thanks @zacwest for linking this helpful part of the HA Docs. I see that in iOS, you have to “long press” the notification in order for these Actionable Notifications show up. I wonder if anyone out there knows of a way for my tapping of a notification delivered by home assistant (not long pressing) it is possible to perform an actionable notification that way? So if I get an alarm tripped notification, I can just tap the notification to hop over to the specific alarm dashboard. Right now, if I build an actionable notification using the “URI” action, I have to long press in order to go to my alarm dashboard.
I’ve been trying to get this to work for me but no matter how I write it doesn’t work. When I click on the notification it opens the Companion App to whatever page I was on last. This seems so simple so I must be missing something obvious but can not figure it out! Here’s two ways I tried - the notification works but the action doesn’t. The only thing I can think of is because I’m using Nabu Casa but I’m not sure…thanks for anything you can offer.
Hello. I apologize for a necro, but I don’t think a new thread over the “same-ol-thing” would have been very respectful, either.
I am trying to get an actionable notification to have a “clickAction/url” (depending on whether its an Android or iOS device) AND be persistent (unable to swipe away)
Below is my current script:
alias: night Confirmable Notification
use_blueprint:
path: homeassistant/confirmable_notification.yaml
input:
notify_device: 325179e1cba09299033239ca60b83252
title: Night time?
message: Are you ready for bed?
data:
url: "/zwave"
clickAction: "/zwave"
persistent: true
tag: nighttime
confirm_text: Yes!!
dismiss_text: Not yet (5m reminder)
confirm_action:
- service: automation.trigger
metadata: {}
data:
skip_condition: true
target:
entity_id: automation.lights_out_routine
dismiss_action:
- service: script.toggle
target:
entity_id: script.delay_bedtime
data: {}
icon: mdi:bell-sleep
clicking the actionable buttons (yes or no) works just fine and either triggers the intended night time mode or delays and then calls this script in a loop to retrigger the actionable notification again.
What is missing is the “url” portion so that if someone accidentally clicks the notification itself, it won’t just go to the “default-view” dashboard, but will instead launch to the specific zwave dashboard where we can manually turn off lights, etc
This dashboards specific location is: http://IP_ADDRESS:8123/lovelace/zwave
Please note that I have tried: url: “/zwave” clickAction: “/zwave”
and url: “lovelace/zwave” clickAction: “lovelace/zwave”
I haven’t even begun to try to get persistent notifications working at the same time because I am trying to operate with “one variable at a time”