Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
executable file 573 lines (497 sloc) 15.3 KB
#################################################################
## Doorbell Automations
#################################################################
##########################################################
## Turn On Front Porch Lights when Doorbell Rings
##########################################################
- alias: Doorbell - Turn On Front Porch Lights when Rung
id: 'doorbell_turn_on_front_porch_lights_when_rung'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
action:
- service: light.turn_on
entity_id:
- light.front_porch
data:
brightness_pct: 100
##########################################################
## Reset Front Porch Lights Brightness After Doorbell Rings
##########################################################
- alias: Doorbell - Reset Front Porch Lights Brightness After Ring
id: 'doorbell_reset_front_porch_lights_brightness_after_ring'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'on'
to: 'off'
for:
hours: 0
minutes: 15
seconds: 0
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
action:
- service: light.turn_on
entity_id:
- light.front_porch
data:
brightness_pct: 50
transition: 900
##########################################################
## Turn On Front Porch Lights when Motion Detected
##########################################################
- alias: Doorbell - Turn On Front Porch Lights when Motion Detected
id: 'doorbell_turn_on_front_porch_lights_when_motion_detected'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_motion
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
action:
- service: light.turn_on
entity_id:
- light.front_porch
data:
brightness_pct: 100
##########################################################
## Reset Front Porch Lights Brightness After Motion Detected
##########################################################
- alias: Doorbell - Reset Front Porch Lights Brightness After Motion Detected
id: 'doorbell_reset_front_porch_lights_brightness_after_motion_detected'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_motion
from: 'on'
to: 'off'
for:
hours: 0
minutes: 15
seconds: 0
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: state
entity_id: light.front_porch
state: 'on'
for:
hours: 0
minutes: 30
seconds: 0
action:
- service: light.turn_on
entity_id:
- light.front_porch
data:
brightness_pct: 50
transition: 900
##########################################################
## Turn On Lights when Doorbell Rings and Away
##########################################################
- alias: Doorbell - Turn On Lights when Ring and Away
id: 'doorbell_turn_on_lights_when_ring_and_away'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: group.household
state: 'home'
action:
- service: light.turn_on
entity_id:
- light.living_room_lamps
- light.office_lamp
- light.closet_lamp
- light.kitchen_sink
- light.back_door
- light.garage_light
data:
brightness_pct: 100
color_temp: 447
##########################################################
## Turn Off Lights After Doorbell Rings and Away
##########################################################
- alias: Doorbell - Turn Off Lights After Ring and Away
id: 'doorbell_turn_off_lights_after_ring_and_away'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'on'
to: 'off'
for:
hours: 0
minutes: 15
seconds: 0
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: group.household
state: 'home'
action:
- service: light.turn_off
entity_id:
- light.living_room_lights
- light.office_lamp
- light.closet_lamp
data:
transition: 900
- service: light.turn_off
entity_id:
- light.kitchen_sink
- service: light.turn_on
entity_id:
- light.back_door
- light.garage_light
data:
brightness_pct: 1
##########################################################
## Turn On Lights when Motion Detected and Away
##########################################################
- alias: Doorbell - Turn On Lights when Motion Detected and Away
id: 'doorbell_turn_on_lights_when_motion_detected_and_away'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_motion
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: group.household
state: 'home'
action:
- service: light.turn_on
entity_id:
- light.living_room_lamps
- light.office_lamp
- light.closet_lamp
- light.kitchen_sink
- light.back_door
- light.garage_light
data:
brightness_pct: 100
color_temp: 447
##########################################################
## Turn Off Lights After Motion Detected and Away
##########################################################
- alias: Doorbell - Turn Off Lights After Motion Detected and Away
id: 'doorbell_turn_off_lights_after_motion_dtected_and_away'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_motion
from: 'on'
to: 'off'
for:
hours: 0
minutes: 15
seconds: 0
condition:
- condition: state
entity_id: sun.sun
state: 'below_horizon'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: not
conditions:
- condition: state
entity_id: group.household
state: 'home'
action:
- service: light.turn_off
entity_id:
- light.living_room_lights
- light.office_lamp
- light.closet_lamp
data:
transition: 900
- service: light.turn_off
entity_id:
- light.kitchen_sink
- service: light.turn_on
entity_id:
- light.back_door
- light.garage_light
data:
brightness_pct: 1
##########################################################
## Front Door Camera TV when Doorbell Rings
##########################################################
- alias: Doorbell - Front Door Camera TV when Doorbell Rings
id: 'doorbell_front_door_camera_tv_when_doorbell_rings'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: group.household
state: 'home'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: or
conditions:
- condition: state
entity_id: input_select.living_room_tv_remote
state: 'Watch TV'
- condition: state
entity_id: input_select.living_room_tv_remote
state: 'Play Sonos'
action:
- service: camera.play_stream
data:
entity_id: camera.front_porch
media_player: media_player.living_room_appletv
##########################################################
## Front Door Camera TV when Doorbell Rings and Motion Detected
##########################################################
- alias: Doorbell - Front Door Camera TV when Doorbell Rings and Motion Detected
id: 'doorbell_front_door_camera_tv_when_doorbell_rings_and_motion_detected'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: group.household
state: 'home'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: state
entity_id: input_select.living_room_tv_remote
state: 'PowerOff'
- condition: time
after: '08:00:00'
before: '22:00:00'
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.living_room_occupancy
state: 'on'
- condition: state
entity_id: binary_sensor.living_room_motion
state: 'on'
action:
- service: camera.play_stream
data:
entity_id: camera.front_porch
media_player: media_player.living_room_appletv
- service: input_select.select_option
data:
entity_id: input_select.living_room_tv_remote
option: "Watch TV"
- delay: '00:02:00'
- service: input_select.select_option
data:
entity_id: input_select.living_room_tv_remote
option: "PowerOff"
##########################################################
## Camera Office TV when Doorbell Rings TV Off
##########################################################
- alias: Doorbell - Camera Office TV when Doorbell Rings TV Off
id: 'doorbell_camera_office_tv_when_doorbell_rings_tv_off'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: time
after: '08:00:00'
before: '23:00:00'
- condition: state
entity_id: person.USER1
state: 'home'
- condition: state
entity_id: binary_sensor.office_occupancy
state: 'on'
- condition: state
entity_id: input_select.USER1_s_office_tv_remote
state: 'PowerOff'
action:
- service: camera.play_stream
data:
entity_id: camera.front_porch
media_player: media_player.USER1_s_office_apple_tv
- service: input_select.select_option
data:
entity_id: input_select.USER1_s_office_tv_remote
option: "Watch TV"
- delay: '00:05:00'
- service: input_select.select_option
data:
entity_id: input_select.USER1_s_office_tv_remote
option: "PowerOff"
##########################################################
## Camera Office TV when Doorbell Rings TV On
##########################################################
- alias: Doorbell - Camera Office TV when Doorbell Rings TV On
id: 'doorbell_camera_office_tv_when_doorbell_rings_tv_on'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: time
after: '08:00:00'
before: '03:30:00'
- condition: state
entity_id: person.USER1
state: 'home'
- condition: state
entity_id: binary_sensor.office_occupancy
state: 'on'
- condition: state
entity_id: input_select.USER1_s_office_tv_remote
state: 'WatchTV'
action:
- service: camera.play_stream
data:
entity_id: camera.front_porch
media_player: media_player.USER1_s_office_apple_tv
##########################################################
## Front Door Camera Bedroom TV when Doorbell Rings
##########################################################
- alias: Doorbell - Front Door Camera Bedroom TV when Doorbell Rings
id: 'doorbell_front_door_camera_bedroom_tv_when_doorbell_rings'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: group.household
state: 'home'
- condition: state
entity_id: input_boolean.disable_doorbell
state: 'off'
- condition: state
entity_id: input_select.bedroom_tv_remote
state: 'Watch TV'
- condition: time
after: '08:00:00'
before: '21:00:00'
action:
- service: camera.play_stream
data:
entity_id: camera.front_porch
media_player: media_player.bedroom_apple_tv
#################################################################
## Notifications
#################################################################
##########################################################
## Doorbell Ring iOS Notification
##########################################################
- alias: Doorbell - Ring iOS Notification
id: 'doorbell_ring_ios_notification'
trigger:
- platform: state
entity_id: binary_sensor.ring_front_door_ding
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_boolean.disable_notifications
state: 'off'
action:
- service: notify.mobile_app_USER1s_iphone
data:
message: Someone is at the Front Door
data:
apns_headers:
'apns-collapse-id': 'doorbell-front-porch-camera'
push:
category: camera
entity_id: camera.front_porch
- service: notify.mobile_app_USER2_s_iphone
data:
message: Someone is at the Front Door
data:
apns_headers:
'apns-collapse-id': 'doorbell-front-porch-camera'
push:
category: camera
entity_id: camera.front_porch
##########################################################
## Ring Battery Low
##########################################################
- alias: Doorbell - Ring Battery Low
id: 'doorbell_ring_battery_low'
trigger:
- platform: numeric_state
entity_id: sensor.ring_front_door_battery
below: 31
for:
hours: 1
minutes: 0
seconds: 0
condition:
- condition: state
entity_id: input_boolean.disable_notifications
state: 'off'
action:
- service: notify.mobile_app_USER1s_iphone
data:
message: Ring Battery Low, Replace Battery Soon
You can’t perform that action at this time.