So I got the following Action part of the automation saving onto the local pi directory:
alias: FortCam1_Person_Photo
description: Take snapshot of stream when a person is detected
trigger:
- type: turned_on
platform: device
device_id: *********
entity_id: binary_sensor.fortcam1_person_detected
domain: binary_sensor
condition: []
action:
- service: camera.snapshot
data:
filename: >-
/config/www/tmp/PERSON_FortCam1_{{
now().strftime("%Y_%m_%d_%H_%M_%S")}}.jpg
target:
entity_id: camera.fortcam1_high
mode: single
Then thought to move the file to an SMD share with the following syntax:
- service: camera.snapshot
data:
filename: /config/www/tmp/PERSON_FortCam1_{{ now().strftime("%Y_%m_%d_%H_%M_%S")}}.jpg
target:
entity_id: camera.fortcam1_high
- service: smb.mkdir
data:
path: '//FortData/HomeAssistant/Backups/CameraBackups'
username: HomeAssistant
password: !secret HomeAssistant_FortData
domain: WORKGROUP
- service: smb.file_move
data:
src_path: '/config/www/tmp/PERSON_FortCam1_{{ now().strftime("%Y_%m_%d_%H_%M_%S") }}.jpg'
dst_path: '//FortData/HomeAssistant/Backups/CameraBackups/PERSON_FortCam1_{{ now().strftime("%Y_%m_%d_%H_%M_%S") }}.jpg'
username: HomeAssistant
password: !secret HomeAssistant_FortData
domain: WORKGROUP
But I fail to be able to save the YAML - Any assistance would be great!