Receiving camera snapshots as a notification in the IOS app

Hi all,
this is my “action”

action:
  - service: camera.snapshot
    data:
      filename: /home/homeassistant/.homeassistant/www/doorbell.png
    entity_id: camera.camera_ext
  - service: notify.mobile_app_mi_9
    data:
      message: Someone has pressed the doorbell.
      data:
        attachment:
          content-type: png
          hide-thumbnail: false
          url: https://mydomain:8123/local/doorbell.png

I receive the text but not the image, what is wrong? In my folder the image .png is present, so the camera takes the picture…

Do you get to see the image when you long-press on the notification?

I solved at this way:

service: notify.mobile_app_mi_9
data:
  message: Hanno suonato il campanello!
  data:
    image: >-
      https://mydom:8123/local/campanello/doorbell_{{
      now().strftime("%Y%m%d-%H%M") }}.png
    clickAction: >-
      https://mydom:8123/local/campanello/doorbell_{{
      now().strftime("%Y%m%d-%H%M") }}.png
2 Likes

Ah, I missed that you were using iOS syntax on an Android phone :woozy_face:

Dear iPhone users on the latest HA (2023.04), please use the following:

alias: testetestest
description: ""
trigger:
  - type: turned_on
    platform: device
    device_id: 0c8960e28de844963574da778524c73d
    entity_id: binary_sensor.doorbell_visitor
    domain: binary_sensor
condition: []
action:
  - service: camera.snapshot
    data:
      filename: /config/www/snapshots/doorbell.png
    target:
      entity_id: camera.doorbell
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: notify.mobile_app_iphone
    data:
      message: Someone is at the front door
      title: Security Alert
      data:
        image: "/local/snapshots/doorbell.png"
mode: single

Hi there,

I just have a question about the initial part where you add a whitelist_dirs to configuration.yaml. I’ve tried doing that but I keep getting an error no matter what I try.

Could you perhaps show your configuration.yaml, particularly the part of the file showing the whitelist_dirs biy? It might well be my formatting or whatnot so I want to verify.

Cheers,
Bel*.