In your case you need to add the image, not the URL. Try something like this:
- service: notify.<yourdevice>
data:
title: TEST
message: Here is a test image
data:
push:
sound:
name: default
critical: 1
volume: 1
image: /media/local/Cameras/cam1/latest_snap.jpg
I save the image to disk first (use the folder /media/Cameras/cam1/latest_snap.jpg WITHOUT local here!
With regards to the URL part, I have the same thing. I want to show some pictures in lovelace and link it to the app, no go. So when I click the Companion app pop-up it links me to that specific image in the app. Only way this works is putting it in the www folder structure, but I like to avoid that since that is publicly accessible in theory.
You can look-up the auth token in the media browser (find the pic, right click it and open in new browser window) but I presume the auth token will expire sooner or later and that will lock you out of home assistant since it will ban your IP after x unsuccessful auth attempts.
it looks like lovelace / picture card / mobile app and the media service don’t play nice together yet.
@Tinkerer, you often know a lot!
Are we using it incorrectly, och should I post a feature request or a bug-report? It feels like it is somewhere in between here… Thanks for advice!
Good idea! Since i can’t find anything in the documentation that it should work i think it be a feature request. If you have filed it, please post a link here so we know it’s connected and can follow the progress.
Hi @MortyFleem I have no idea. As they told me in that issue, media source is intended only to stream/send media files to players (like Alexas and other players).
To use pictures privately, I’ve built this custom card. It’s a fast implementation so no fancy things. Also, images take longer to load as it need to call one HA service to get the authenticated path of the picture but, in my case, it’s perfectly usable.