I have been using automation to take camera snapshot and send it in notification successfully until few months back, after dozens of HA updates, when I noticed that I actually receive cached image and not up to date one. I was storing them in /config/www/...
. When I listed files in that location, it would seem like file was just created, but never got it in notification, just the old one from god knows when.
I googled and found a topic in this forum that had another advice where to store them, so I changed my automations to store snapshots in /media/images/...
and use /media/local/images/...
to send it in notification. That worked for about last 2 weeks, and I noticed today I again receive notification without any snapshot at all. When I check location, file is there, it has creation date/time of when automation ran, just nothing is attached to the notification.
What is bulletproof method of taking camera snapshot and sending it in notification?
Do what the docs for the companion app recommend - don’t use camera.snapshot
at all. Use the automatic snapshots feature and let the integration take the snapshot for you.
1 Like
Thanks. I didn’t even know this existed. Seems to be working fine.
1 Like
Hey! Just stumbled upon this post trying to fix this very issue. What would the yaml code look like to implement this fix? I’ve been trying a few different workarounds, but haven’t found any success so far.
Here is example of one of my actions I am using:
service: notify.my_notification
data:
title: Door state!
message: >-
{{ trigger.to_state.name }} was {% if
trigger.to_state.state == 'on' %} opened {% else %} closed {% endif %}!
data:
image: /api/camera_proxy/camera.north_high
ttl: 0
priority: high
actions:
- action: silent1h
title: Silent 1h
- action: silent6h
title: Silent 6h
- action: silent12h
title: Silent 12h