I have my configuration setup, Whenever motion is detected it should take a camera.snapshot and save in /media/ directory. When I run it manually from the automation menu, it works perfectly. I am new to Home assistant Automation unable to get it to run automatically. Please help. Please see my configuration below:
id: '1669274337701'
alias: 'Notify: Motion Detected on Frontyard.'
description: ''
trigger:
- type: motion
platform: device
device_id: cb848d50d340ded6272b614a4be93c92
entity_id: binary_sensor.frontyard_motion_region_detection
domain: binary_sensor
for:
hours: 0
minutes: 0
seconds: 0
condition: []
action:
- service: notify.mobile_app_s22_ultra_aaziz
data:
title: 'Motion Detected: Check Front Yard.'
message: Someone in Frontyard, check images folder.
data:
image: '{{ states.camera.doods_frontyard.attributes.entity_picture }}'
- service: camera.snapshot
data:
filename: /media/detected_front_yard_{{now().strftime('%Y%m%d_%H%M%S')}}.jpg
target:
device_id:
- cb848d50d340ded6272b614a4be93c92
- cb848d50d340ded6272b614a4be93c92
entity_id: camera.doods_frontyard
mode: single
Any help would be greatly appreciated!