Hello,
i made a automation where he records a stream for 30 seconds, and saved it with timestamp,
“haustuere_{{ now().strftime(”%Y%m%d-%H%M%S")}}"
and there is the problem.
The Timestamp is not the same when sending the video, because its 40 seconds after record.
is it somewhere possible over a “recorded filename” or “triggered filename” to get the saved filename in the notify action?
i need the timestamp, because i want to save the files for a later watch when something is happen
Here is my Code
alias: Bewegung an der Haustüre - erstelle Video
description: ''
trigger:
- type: motion
platform: device
device_id: 941d002b67d7183bf91dfbff1f4d6bc3
entity_id: binary_sensor.motion_sensor_outdoor_hausture_motion
domain: binary_sensor
condition:
- condition: state
entity_id: binary_sensor.someone_home
state: 'off'
action:
- service: camera.record
target:
entity_id: camera.kamera_frontdoor
data:
duration: 30
filename: /config/www/video/haustuere_{{ now().strftime("%Y%m%d-%H%M%S")}}.mp4
- wait_for_trigger:
- platform: event
event_type: folder_watcher
event_data:
event_type: closed
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- service: notify.mobile_app_iphone_von_marc
data:
data:
video: '/local/video/haustuere_{{ now().strftime("%Y%m%d-%H%M%S")}}.mp4'
message: Bewegung an der Haustüre
title: Bewegungsalarm
mode: single