Hi, i want to store snapshots of images from the doorbell in a folder so i can view them later. As well as sending them in a notification to my android phone.
The following code is working and overwrites each time the image (which i don’t want )
- service: camera.snapshot
data_template:
entity_id: camera.deur
filename: "www/tmp/doorbell_snapshot.jpg"
- delay: '00:00:01'
- service: notify.all_phones
data:
title: "Ding Dong!"
message: |
{{now().strftime("%H:%M:%S")}} Er staat iemand voor de deur!
data:
image: "https://xxx/local/tmp/doorbell_snapshot.jpg"
The following code is correctly storing my images with a time behind it. But they never are send in the notification (probably because the url isn’t correct?)
- service: camera.snapshot
data_template:
entity_id: camera.deur
filename: "www/tmp/doorbell_snapshot_{{ trigger.to_state.last_changed.strftime('%Y%m%d%H%M') }}.jpg"
- delay: '00:00:01'
- service: notify.all_phones
data:
title: "Ding Dong!"
message: |
{{now().strftime("%H:%M:%S")}} Er staat iemand voor de deur!
data:
image: "https://xxx/local/tmp/doorbell_snapshot_{{ trigger.to_state.last_changed.strftime('%Y%m%d%H%M') }}.jpg"
Anybody has an idea what i am doing wrong?