Update ring.markdown (#15252)

The automation `action` section is confusing for people, so I've reworked it to be an actual automation.
This commit is contained in:
Dubh Ad 2020-10-15 18:49:47 +01:00 committed by GitHub
parent d6693742a6
commit 9ea1d27871
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,11 +56,17 @@ downloader:
download_dir: downloads
```
Then you can use the following `action` in your automation (this 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/ring_<camera_name>/`:
{% raw %}
```yaml
action:
automation:
alias: 'Save the video when the doorbell is pushed'
trigger:
- platform: state
entity_id: binary_sensor.front_doorbell_ding
to: 'on'
action:
- service: downloader.download_file
data:
url: "{{ state_attr('camera.front_door', 'video_url') }}"