Skip to content

Instantly share code, notes, and snippets.

View automation.yaml
### TRIGGERS MOTION RECORDING ON CAMERA IN SECURITY SPY AND SAVES A PICTURE (CAPTURED IN HOMEASSISTANT) TO SEND VIA TELEGRAM WHEN A SENSOR ON LETTERBOX IS TRIGGERED
- alias: 'letterbox'
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.rf_reed_sensor_2 ### THIS IS A REED SENSOR ATTACHED TO THE LETTERBOX
from: 'off'
to: 'on'
action:
View driveway.scpt
### Located in user/SecuritySpy/Scripts
### Camera number taken from (Command + I)
### corresponds to the shell commands in configuration.yaml, this one is "driveway_motion_trigger:"
tell application "SecuritySpy"
set motion camera number 2
end tell
View configuration.yaml
################
### CONFIG ###
################
homeassistant:
whitelist_external_dirs:
- '/home/homeassistant/.homeassistant/camera_snapshot'
#####################