mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Update ring.markdown (#21724)
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
cfa6494ff8
commit
4ef7a89755
@ -59,7 +59,7 @@ downloader:
|
|||||||
download_dir: downloads
|
download_dir: downloads
|
||||||
```
|
```
|
||||||
|
|
||||||
Then you can use the following automation, with the entities from your system, which will save the video file under `<config>/downloads/ring_<camera_name>/`:
|
Then you can use the following automation, with the entities from your system, which will save the video file under `<config>/downloads/<camera_name>/<camera_name>/`:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
@ -80,6 +80,19 @@ automation:
|
|||||||
|
|
||||||
{% endraw %}
|
{% 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 `<config>/downloads/<camera_name>/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:
|
If you want to use `python_script`, enable it your `configuration.yaml` file first:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user