Can't get snapshot in notification attachment

Hey there,

Using android companion app…I can’t get a local snapshot to display in my notification.

This works :

  - action: notify.mobile_app_sm_s916w
    data:
      message: TEST
      data:
        image: https://www.home-assistant.io/images/default-social.png

But this doesn’t :

action: notify.mobile_app_sm_s916w
data:
  message: TEST
  data:
    image: "/media/local/snapshot.jpg"

And I do have this in my configuration.yaml

default_config:

homeassistant:
  media_dirs:
    local: /media

  allowlist_external_dirs:
    - "/config/media/"

The snapshot is indeed in the right directory…
What’s wrong ? I’m sure it has to do with accessing the snapshot…

Hi,

I do not use the below in my configutation.yaml

homeassistant:
  media_dirs:
    local: /media

I am only using:

homeassistant:
  allowlist_external_dirs:
    - /config/www/tmp/

and for notification data image (without the “”):

image: /local/tmp/snapshot.jpg

Maybe with this works, remove the /config and the “” from the image url

action: notify.mobile_app_sm_s916w
data:
  message: TEST
  data:
    image: /local/media/snapshot.jpg

Thank you, made both changes, but still not getting an image in the notification.

Hi,

your .jpg file needs to be in the /www/tmp/ folder with this setup.
Then the image URL in your notification should be image: /local/tmp/snapshot.jpg