Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actionable notification with URL doesnt work #29

Open
BNWEIN opened this issue Jun 27, 2023 · 1 comment
Open

Actionable notification with URL doesnt work #29

BNWEIN opened this issue Jun 27, 2023 · 1 comment

Comments

@BNWEIN
Copy link

BNWEIN commented Jun 27, 2023

I have an actionable notification setup, that when clicked should go to a URL, but it simply does not work.

service: notify.mycomputer
data:
message: "This is a test message."
data:
image: "http://192.168.0.239:5000/api/driveway_cam/latest.jpg"
actions:
- action: "URI"
title: "Open URL"
uri: "http://192.168.0.239:5000/live/webrtc/stream.html?src=camera.driveway_cam&mode=webrtc"

Github has removed the YAML Formatting but hopefully it makes sense.

@DrR0X-glitch
Copy link

HASS.agent doesn't do actionable notifications the exact same as ios and android. Instead you pass action names and action titles and then it fires an event in hass. You can then use an automation to redirect the client to the url. Something like this:

Script to run notification:
image

HASS.agent command to open url:
image

Automation to open the url:
image

A notification is sent with an action and the title of that action. When the action is clicked an event is fired in hass and the automation detects it. The automation then preses the button that activates the launchurl command in hass.agent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants