Hi @ all…
I have a problem with an Automation…
Target: I just want the Automation to take 3 snapshots when the entry door changes its state from closed to open and send this snapshots via TG (Telegram Bot) to my cellphone…
Taking the pictures works perfect, but it can’t be send because the pictures will be created with a timestamp like HH:MM:SS
When i take a look to the Automation processes the part i want to send the snapshots via telegram has a time different of 3-4 seconds…
How can i fix it?
This is my Automation in Yaml:
alias: TG_Send_Picture
description: >-
If entry door is opened take 3 snapshots and send them via TG
trigger:
- type: opened
platform: device
device_id: dc59[...]935a9
entity_id: binary_sensor.entry_door_contact
domain: binary_sensor
condition: []
action:
- service: camera.snapshot
data:
filename: >-
/config/www/media/camera/snapshots/snap_gr_floor_{{
now().strftime("%Y.%m.%d_%H:%M:%S") }}.jpg
target:
entity_id: camera.gr_flur_hd_stream
- service: telegram_bot.send_photo
data:
target: *censored*
file: >-
/config/www/media/camera/snapshots/snap_gr_floor_{{
now().strftime("%Y.%m.%d_%H:%M:%S") }}.jpg
caption: Urgent Security Message
enabled: true
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 50
- service: camera.snapshot
data:
filename: >-
/config/www/media/camera/snapshots/snap_gr_floor_{{
now().strftime("%Y.%m.%d_%H:%M:%S") }}.jpg
target:
entity_id: camera.gr_flur_hd_stream
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 50
- service: camera.snapshot
data:
filename: >-
/config/www/media/camera/snapshots/snap_gr_floor_{{
now().strftime("%Y.%m.%d_%H:%M:%S") }}.jpg
target:
entity_id: camera.gr_flur_hd_stream
- service: telegram_bot.send_photo
data:
target: *censored*
file: >-
/config/www/media/camera/snapshots/snap_gr_floor_{{
now().strftime("%Y.%m.%d_%H:%M:%S") }}.jpg
caption: Urgent Security Message
enabled: true
mode: single
I hope someone has an Idea to solve it…
Kind Regards…