- id: '1664919647127'
alias: Notify when doorbell senses motion
description: ''
trigger:
- type: motion
platform: device
device_id: cfad552d81098c4038ea2d4bd813b366
entity_id: binary_sensor.front_door_motion
domain: binary_sensor
condition: []
mode: single
action:
- service: notify.persistent_notification
data:
message: '{{ trigger.to_state.attributes.friendly_name }} opened {{now().strftime("%c")}}'
title: Doorbell motion sense
- service: downloader.download_file
data:
url: '{{ state_attr(''camera.front_door'', ''video_url'') }}'
subdir: '{{ state_attr(''camera.front_door'', ''friendly_name'') }}/{{ now().strftime(''%Y.%m'')
}}'
filename: '{{ now().strftime(''%Y-%m-%d-%H-%M-%S'') }}.mp4'
Private
Yes