From 4ef7a897552b283b9931f4deaaef03f907cbd520 Mon Sep 17 00:00:00 2001 From: Rob_R <1743138+Robbot@users.noreply.github.com> Date: Mon, 21 Feb 2022 22:01:13 +0000 Subject: [PATCH] Update ring.markdown (#21724) Co-authored-by: Franck Nijhof --- source/_integrations/ring.markdown | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/source/_integrations/ring.markdown b/source/_integrations/ring.markdown index 69d27086cee..b40c6ab2c91 100644 --- a/source/_integrations/ring.markdown +++ b/source/_integrations/ring.markdown @@ -59,7 +59,7 @@ downloader: download_dir: downloads ``` -Then you can use the following automation, with the entities from your system, which will save the video file under `/downloads/ring_/`: +Then you can use the following automation, with the entities from your system, which will save the video file under `/downloads///`: {% raw %} @@ -80,6 +80,19 @@ automation: {% endraw %} +You may consider some modifications in the subdirectory and the filename to suit your needs. For example, you can add the date and the time and extension to the downloaded file: + +{% raw %} +```yaml + data: + url: "{{ state_attr('camera.front_door', 'video_url') }}" + subdir: "{{ state_attr('camera.front_door', 'friendly_name') }}/{{ now().strftime("%m.%Y") }}" + filename: "{{ now().strftime("%Y-%m-%d-at-%H-%M-%S") }}.mp4" +``` +{% endraw %} + +the above modification will save the video file under `/downloads//YYYY-MM/YYYY-MM-DD-at-HH-MM-SS.mp4`. You can change the date according to your localization format. + If you want to use `python_script`, enable it your `configuration.yaml` file first: ```yaml