Brilliant - thank you
For clickAction, I can’t seem to get it it pull up the requested view. It still defaults to the default view of the app. Did I misunderstand how it’s used?
automation:
- alias: Notify of Motion
trigger:
...
action:
service: notify.mobile_app_<your_device_id_here>
data:
title: "Motion Detected in Backyard"
message: "Someone might be in the backyard."
data:
clickAction: '/lovelace/cameras_view'
is cameras_view
the path
that you defined for the view? Make sure you are updated to 1.8.0 as well. If that doesn’t work try to start fresh in the app https://companion.home-assistant.io/docs/troubleshooting/faqs/#starting-fresh-with-the-android-app
This one works fine on my Android Samsung S7
action:
service: notify.mobile_app_s7_petter
data:
title: "Movement outdoors"
message: "See picture."
data:
sticky: 'true' # or 'false
color: '#2DF56D' # or 'red'
clickAction: 'https://yoururl.duckdns.org/local/sighthound_wyze_ute_outdoors_latest.jpg' # action when clicking main notification
Yes, I am running 1.8.0, and the URL is defined in my Lovelace view as well. I just performed the “Start Fresh” troubleshooting, and I still have the same result. The app opens the default view.
Is the clickAction meant for just a browser call-up only? In other words, will this action bring up the view in a browser app and not the mobile app?
No its supposed to work with a lovelace view or URL. Can you try it as an actionable notification and see if it works there?
action:
service: notify.mobile_app_<your_device_id_here>
data:
title: "Motion Detected in Backyard"
message: "Someone might be in the backyard."
data:
actions:
- action: URI
title: View
uri: '/lovelace/cameras_view'
For me it works with actions, but if I use the same url like /lovelace/xx it doesn’t work… With the clickaction
Can someone explain why we need the cloud (i.e. firebase) to send push messages? Don’t get me wrong, this is an amazing feature and I will certainly be using it. I’m just wondering from a technical standpoint if this is possible without the cloud… or if it is possible to leverage nabu casa cloud functionality without needing a second cloud service.
FCM requires a server to push messages to the devices. More on that here:
And the code for the FCM push server is here: https://github.com/home-assistant/mobile-apps-fcm-push/
This is separate from Nabu Casa.
Mine '/lovelace/edge'
works but only if the app is not in the foreground/active.
That worked for me! Thanks!
Ah, that’s the reason, while testing, indeed sometimes it worked , sometimes not…
So i’ve installed the android companion app and i’m playing around with notifications.
Everything fine and well, only what i don’t see is a place where my notification history is visible.
Once i click on a notification, my Home Assistant opens and that’s it.
Notification is gone and not visible in a history anywhere.
I’m on the android companion app 1.8.0.145.
Am i missing something?
There is an open feature request for this: https://github.com/home-assistant/home-assistant-android/issues/398
In the meantime android provides notification history for all notifications you receive on the device. Setup a widget for Settings and you should see that option.
Thanks for the feedback. I hope the feature gets attention soon.
The default android solution is something, but far from ideal. First of all on my (samsung) phone it’s not available without installing an additional app. And besides that i want to have just the ones from Home Assistant, not everything else mixed in as well.
Right now i’m using Telegram, which works instantly and gives me a clear history, but also an additional APP i don’t really need.
is it possible with ClickAction to call a service? or only with actionable notifications?
I hear you, I use Discord for my notifications as it not only gives me the history but I can use tasker to change the sound of each channel as I split mine up. I will eventually switch to the app once notification channels and the history are in place.
Not yet but sounds like a good feature request
Just tested the below service call and received all of the information shown in the screenshot via an “All Events” node filtered to receive just the ‘mobile_app_notification_action’ event type. This is a game changer and FINALLY allows me to get rid of the unreliable html5 clickable notifications.
title: "Movement outdoors"
message: "See picture."
data:
sticky: 'true' # or 'false
color: 'red'
clickAction: 'https://yoursite.duckdns.org/lovelace/kitchen' # action when clicking main notification
actions:
- action: URI # action when clicking option
title: View
uri: '/lovelace/family'
- action: "alarm" # action to call a service
title: "Alarm"
Hey all, had a question about camera snapshots and sending them as notifications. I cannot seem to get any pictures to send in notifications but I am able to get links to send. I am trying to send the unique URL for the image. I am able to save the photo taken with /config/www/{{ now().strftime("%Y%m%d-%H%M%S") }}.jpg. I am able to access the image externally through the URL.
My question is how do I insert the filename into the unique URL I am sending? I tried using the same code from above but it only inserts the code into the URL. Is there a way to pull the most recent image?
Thanks!