android icon indicating copy to clipboard operation
android copied to clipboard

Notification Action Button

Open stipe76 opened this issue 4 years ago • 9 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

No

Describe the solution you'd like A clear and concise description of what you want to happen.

Is it possible to call a service from an action button in an actionable notification? I'd like to be able to fire off a webhook directly on button press. Alternatively, is it possible for the URI action to allow HTTP POST and JSON data?

Describe alternatives you've considered, if any A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

stipe76 avatar Nov 08 '20 02:11 stipe76

You should be reacting to the action events in your automations as part of the actionable automation workflow. The event gets fired immediately to your HA server to process.

dshokouhi avatar Nov 08 '20 02:11 dshokouhi

You should be reacting to the action events in your automations as part of the actionable automation workflow. The event gets fired immediately to your HA server to process.

Yep, that's what I'm currently doing. I am also using Tasker to send a webhook from the Notification Bar, and it is so much faster firing a direct HTTP POST than HA reacting to an event. I can live with it, but it would be nice to have this as an option.

Cheers

stipe76 avatar Nov 08 '20 02:11 stipe76

Would this be the same as #396 ?

dshokouhi avatar Nov 08 '20 02:11 dshokouhi

Would this be the same as #396 ?

In part, yes. Something along these lines would be nice

service: notify.mobile_app_pixel_4 data: message: "The light has been left on" data: actions: - action: URI_POST title: "Turn off light" uri: "http://webhook.url" action_data: my_custom_data: {"what":"ever"}

Or similar Edit: not sure how to post that code correctly

stipe76 avatar Nov 08 '20 03:11 stipe76

I'm also interested in having possibilities to get actions_data implemented in Android.

Could simplify a lot my automations

royto avatar Feb 01 '21 20:02 royto

Any updates on this?

stipe76 avatar Mar 20 '21 09:03 stipe76

Hi, when I use the code below, it works normally. When I click on the OPEN CAMERA notification button it opens the app and opens the camera.garage entity. But when I change my user settings, changing the "default" dashboard to any other dashboard, it doesn't work. When I click on OPEN CAMERA it opens the selected dashboard and not the camera.garage entity. I tested it with other entities like sun.sun and the error is the same.

service: notify.mobile_app_mi_9t data: message: The garage door has been open for 10 minutes. title: Your Garage Door Friend data: actions: - action: URI title: OPEN CAMERA uri: entityId:camera.garage

Thanks

homeoneautomacao avatar Jul 02 '21 17:07 homeoneautomacao

@homeoneautomacao please file a separate issue as this is a feature request, make sure to be very descriptive in the bug that you create

dshokouhi avatar Jul 02 '21 17:07 dshokouhi

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jan 08 '22 23:01 stale[bot]