I want to make such automation in telegram_bot so that when the opening sensor is triggered, I do not immediately receive a photo in telegram, but only a link to a file in the form of a url, for example. This is what I want to get: When the opening sensor is triggered, a photo file from the input camera is saved. The file name corresponds to the time and date.
alias: save_photo
trigger:
- platform: state
entity_id: binary_sensor.door
to: on
action:
- service: camera.snapshot
target:
entity_id: camera.out
data:
filename: >-
/config/www/cam_captures/{{ now().strftime("%d.%m") }}/{{
now().strftime("(%d.%m) %H-%M-%S") }}.jpg
A day folder and a time file are created. Things are good. There is an archive.
So I want to make it so that a message like this is immediately sent to the telegram:
“Entry fixed. Link to photo (link).”
We click on the link and only then the exact photo comes to the telegram.
Because now a photo or video comes immediately to my telegram and so every time. And I want everything to be saved simply to disk, and to receive a photo in a message only after an additional click. When it is necessary.
How can I do that?