If you want a static camera snapshot image instead of a streaming one, make a “snapshots” directory under the “www” directory where your config is then use:
action:
- service: camera.snapshot
data_template:
entity_id: camera.front_door_camera
filename: "/config/www/snapshots/front_door_camera_{{ trigger.to_state.last_changed }}.jpg"
- service: notify.ios_iphone
data_template:
message: 'Someone has pressed the door bell at {{now().strftime("%H:%M %d-%m-%y")}} '
data:
attachment:
content-type: jpeg
url: "https://hass.yourdomain.com/local/snapshots/front_door_camera_{{ trigger.to_state.last_changed|urlencode }}.jpg"
entity_id: camera.front_door_camera
Note that /local/ maps to the “www” subdirectory of your config directory.