Can someone help me with this?
It isn’t working. I have ring flood light cameras, and I want to save the the entire video to my server when the motion detected has been finished. I have front and back flood light pros. I am very very new to HA. I am not sure wtf I am doing with this YAML file or this configuration. Especially with the URL portion.
I have MQTT integrated and the Ring integration set up.
My intention is once motion is detected and finished it pulls that entire clip to the nas. I do pay ring subscription. I am not trying to get out of ring subs.
automation:
- alias: "Save the video when motion is detected (Front)"
trigger:
platform: state
entity_id: binary_sensor.front_motion
to: "on"
action:
- service: downloader.download_file
data:
url: "{{ states.camera.front.attributes.video_url }}"
filename: "front-motiondetected-{{ now().strftime('%Y-%m-%d-at-%H-%M-%S') }}.mp4"
target:
dir: "/mnt/remotes/Test2"
- alias: "Save the video when motion is detected (Back)"
trigger:
platform: state
entity_id: binary_sensor.backyard_motion
from: "off"
to: "on"
action:
- service: downloader.download_file
data:
url: "{{states.camera.backyard.attributes.video_url}}"
filename: "back-motiondetected-{{ now().strftime('%Y-%m-%d-at-%H-%M-%S') }}.mp4"
target:
dir: "/mnt/remotes/Test1"