HASS.Agent-Integration icon indicating copy to clipboard operation
HASS.Agent-Integration copied to clipboard

Actionable notification with URL doesnt work

Open BNWEIN opened this issue 2 years ago • 1 comments

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.

BNWEIN avatar Jun 27 '23 16:06 BNWEIN

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.

DrR0X-glitch avatar Nov 07 '23 12:11 DrR0X-glitch