Can not get Image in Notification

Hello,

I am trying to get a image to my notifications in the App.

I tried this with the media_source: (Default_config)
https://companion.home-assistant.io/docs/notifications/notification-attachments/

But i can not get an image to work.

The code:

description: Wasmachine is Klaar
alias: Home Connect Washmachine Finished

id: '1812202112500'
mode: single

trigger:
  - platform: state
    entity_id: sensor.wasmachine_operation_state
    from: Run
    to: Finished
    
condition: []
    
action:
  - service: notify.rick_android
    data:
      title: Wasprogramma is Afgerond
      message: Het wasprogramma is klaar, haal het wasgoed uit de machine.
      data:
        channel: "Huishoudelijk"
        importance: high
        image: '/media/local/notifications/devices/washing-machine.jpg'

Can someone help me with what i am doing wrong?

I’m also having some trouble with this.

Using the info from the link provided by Ricks above, I can get the url image provided in the “example service call” to work, but I can’t seem to get a local image to work.

I’ve set up the below automation with a “camera.png” file in each location. Each of the notifications are working, but only the url one shows an image. I can’t seem to figure it out - but I am a noob so it could be something very simple.

- id: '1639830386968'
  alias: aaa test notification
  description: ''
  trigger:
  - platform: device
    # using a xiaomi button to trigger the automation for now
    domain: mqtt
    device_id: ed67495211e4ae7af2d1488579f7a58f
    type: action
    subtype: single
    discovery_id: 0x00158d0005216909 action_single
  condition: []
  action:
  # First test notification using URL - works fine
  - service: notify.mobile_app_oneplus_a6003
    data:
      message: Notification test 1 (URL)
      data:
        # absolute url example provided in documentation
        image: "https://github.com/home-assistant/assets/blob/6a407898bd8ae80eb83634ffddb0d5ebdde95957/logo/logo.png?raw=true"
  # Second test - Notification with message appears, but without image. Camera.png image is saved in the www folder
  - service: notify.mobile_app_oneplus_a6003
    data:
      message: Notification test 2 (Local - www)
      data:
        path: /config/www/camera.png
  # Third test - Notification with message appears, but without image. Camera.png image is saved in the www folder
  - service: notify.mobile_app_oneplus_a6003
    data:
      message: Notification test 3 (Local - tmp)
      data:
        path: /config/tmp/camera.png
  # Fourth test - Notification with message appears, but without image. Camera.png image is saved in the www folder
  - service: notify.mobile_app_oneplus_a6003
    data:
      message: Notification test 4 (Local - media/local)
      data:
        path: /config/media/local/camera.png
  mode: single

Screenshot of the outcome from the above automation.

Thanks in advance for any help!

Found any solotion yet? i tried everything but local does not work…

No joy on my end I’m afraid. I was trying to do this for an image of a doorbell press and I found the below blueprint that did the trick. I would like to figure this out for other use cases though…

From looking at this blueprint, it seems like you should put the image in config/www/image and reference it as image: /local/image when calling then notify service.

2 Likes

but for notifications it should be Outside the www folder

Thank you Ondra - this worked perfectly for me! :grinning: