Skip to content

Instantly share code, notes, and snippets.

@langelguy
Last active April 18, 2020 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save langelguy/53cb533c9e856c6d5e416d5c09fed4d7 to your computer and use it in GitHub Desktop.
Save langelguy/53cb533c9e856c6d5e416d5c09fed4d7 to your computer and use it in GitHub Desktop.
GitHub
#automations.yaml#
- alias: 'Take picture when Door Bell Pressed'
id: Take_picture_when_Door_Bell_Pressed
initial_state: 'on'
trigger:
platform: state
entity_id: binary_sensor.front_door_ding
to: 'on'
action:
- service: camera.snapshot
data_template:
entity_id: camera.front_door
filename: "/config/www.jpg"
- delay: '00:00:01'
- service: notify.mobile_app_spencers_iphone
data_template:
message: 'Someone has pressed the doorbell'
data:
attachment:
content-type: jpeg
url: "/config/www.jpg"
- alias: go_to_live_feed
id: go_to_live_feed
initial_state: 'on'
trigger:
platform: event
event_type: ios.notification_action_fired
event_data:
actionName: LIVE_FEED
action:
- service: notify.mobile_app_spencers_iphone
data_template:
message: 'Someone has pressed the doorbell'
data:
attachment:
content-type: jpeg
push:
badge: 0
sound: default
category: camera
entity_id: camera.front_door
ios:
push:
categories:
- name: doorbell
identifier: 'doorbell'
actions:
- identifier: 'LIVE_FEED'
title: 'Go to Live Feed'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment