I’ve setup my camera to record video and take snapshot when triggerd by person. Snapshots are set as overwrite, so I have no issue referencing it. However, mp4s are named by time of recording, how do I reference it so I can view the clip without downloading the file or finding out the exact file name? Is there a way to reference last modified file?
action:
- service: camera.record
target:
entity_id: camera.living_room
data:
filename: >-
/config/www/nest/living_room/living_person_detected{{
now().strftime("%Y%m%d-%H%M%S") }}.mp4
duration: 20
- service: camera.snapshot
data:
filename: /config/www/nest/living_room/living_person.jpg
target:
entity_id: camera.living_room
camera_view: auto
type: picture-glance
image: http://192.168.66.134:8123/local/nest/living_room/living_person.jpg
entities: []
title: Living
tap_action:
action: url
url_path: http://192.168.1.134:8123/local/nest/living_room/living_person.jpg
hold_action:
action: url
url_path: >-
http://192.168.1.134:8123/local/nest/living_room/living_person_detected{{
now().strftime("%Y%m%d-%H%M%S") }}.mp4 **Doesn't work**