In the notification you use dont_vacuum
and in the automation dontvacuum
. Both must be the same.
indeed, clickaction doesnt load the correct tab
actionable notiftcatin is working though
after further testing seems that for me clickaction works only with full url
this works :
clickAction: 'https://xxx.ui.nabu.casa/lovelace/doorbell'
this doesnt work :
clickAction: '/lovelace/doorbel
l’
edit, i was wrong, it still opens in a browser
Thanks for testing, we have a bug opened for this now.
Has anyone looked at the return event which is sent when an action is clicked on the android notification?
As per documentation here (https://companion.home-assistant.io/docs/notifications/actionable-notifications) it is supposed to have the following elements (please note that this is from the documentation)
{
"event_type": "mobile_app_notification_action",
"data": {
"action": "KEY_ONE",
"action_2_title": "Action 2",
"action_3_title": "Action 3",
"action_1_title": "Action 1",
"action_1_key": "KEY_ONE",
"action_2_key": "KEY_TWO",
"action_3_key": "KEY_THREE"
},
"origin": "REMOTE",
"time_fired": "2020-02-02T04:45:05.550251+00:00",
"context": {
"id": "abc123",
"parent_id": null,
"user_id": "123abc"
}
}
when I capture the event in node-red… it only has the following (please note that this is my data and will be different to what is above)
{
"event_type":"mobile_app_notification_action",
"event":{
"action_2_key":"SNOOZE",
"action_2_title":"Snooze for 5 mins",
"action_3_key":"REMIND_AT_HOME",
"action_3_title":"Remind me at Home",
"sticky":"true",
"title":"Low Battery",
"message":"Charge your phone",
"action_1_title":"Remind Later",
"action_1_key":"REMIND_LATER",
"action":"SNOOZE"}
}
My questions:
-
Compared to another video I saw, I noted that the “source” element is missing? Do we expect to see the source element returned?
-
Also compared to the documentation the following elements are missing
"origin": "REMOTE",
"time_fired": "2020-02-02T04:45:05.550251+00:00",
"context": {
"id": "abc123",
"parent_id": null,
"user_id": "123abc"
}
Has anyone come across this issue?
Use the events tab in developer tools instead of node-red. When I listen to the event mobile_app_notification_action
which is at the bottom of that page. I can then trigger the notification and click on an action and I see similar data as to what is documented.
{
"event_type": "mobile_app_notification_action",
"data": {
"message": "test",
"action_1_title": "test",
"action_1_key": "action1",
"action": "action1"
},
"origin": "REMOTE",
"time_fired": "2020-05-05T14:01:06.626951+00:00",
"context": {
"id": "ID",
"parent_id": null,
"user_id": "USERID"
}
}
Is it possible to call a service from an action with android? E.g.
title: "Alarm Not Set"
message: "You are not home and your alarm is off"
data:
sticky: 'false'
color: 'red'
clickAction: 'https://xxx.ui.nabu.casa/'
actions:
- action: URI
title: "Test"
uri: 'https://www.google.com'
- action: call-service
title: "Arm"
service: alarm_control_panel.alarm_arm
data:
entity_id:
- alarm_control_panel.alarm_com
Yes read all of this page https://companion.home-assistant.io/docs/notifications/actionable-notifications
I did, several times. Unfortunately I couldn’t figure it out… Did not see any example like what I’m trying above.
You missed the part about the automation, keep scrolling down. You need 1 automatoin to send the notification with the actions and you need another automation to react to the event. Its a 2 parter.
Yeah, I read that. My original question was whether or not a service could be called directly from the notification bit. But I’ll take this dialogue as a no.
If it were possible it would be documented
Are Categories Possible with Android?
Didn’t see it had been released, just tried it and it works very well. Many thanks to all involved!
this one is closed? but its not yet in the appstore, right?
Didn’t see a more recent thread, so I’m posting here.
Love the actionable notifs for Android. I have it working from NodeRed and they’re so useful.
Doesn’t look like a lot of the options work for Android though. Destructive and sticky don’t seem to do anything on my Android phone.
android does not support destructive
double check that you are following the android examples, check the troubleshooting section in the docs if you are still stuck.
How can I “extract” the event action: “cat_yes” on node red? I made a node event:all for mobile_app_notification_action but don’t know who to go further and do something if YES and other if NO.
I assume you found your answer already but in case you did not… I just started messing with it… If you attach a debug node (complete msg) to the event capture “mobile_app_notification_action” you will notice that under msg.payload everything related to the action response is in there. Specifically msg.payload.event and the response is located at msg.payload.event.action… here is a picture of me playing around with it