Too many updates to cover

This commit is contained in:
Jeffrey Stone
2019-07-13 21:38:53 -04:00
parent 328ecf126c
commit d90380cc65
73 changed files with 1108 additions and 1171 deletions

209
packages/security.yaml Normal file → Executable file
View File

@@ -138,15 +138,64 @@ automation:
- service: shell_command.door_chime
initial_state: true
- id: door_opened_long
alias: Door Opened Too Long
trigger:
- platform: state
entity_id:
- binary_sensor.front_door
- binary_sensor.laundry_room_door
- binary_sensor.attic_door
- binary_sensor.back_door
from: 'off'
to: 'on'
for: '00:01:00'
condition:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
action:
- service: script.jarvis_voice
data_template:
message: "I thought you might like to know, the {{ trigger.to_state.attributes.friendly_name }} has been standing open for more than a minute."
initial_state: true
- id: garage_opened_night
alias: Garage Opened at Night
trigger:
- platform: state
entity_id: group.garage_doors
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: sun.sun
state: below_horizon
action:
- service: script.driveway_on
initial_state: true
- id: garage_closed
alias: Garage Opened at Night
trigger:
- platform: state
entity_id: group.garage_doors
from: 'on'
to: 'off'
action:
- service: script.driveway_off
initial_state: true
- id: security_breach_door
alias: Security Breach Doors
trigger:
- platform: state
entity_id:
- binary_sensor.front_door_contact_2
- binary_sensor.laundry_room_door_contact_2
- binary_sensor.attic_door_contact_2
- binary_sensor.back_door_contact_2
- binary_sensor.front_door
- binary_sensor.laundry_room_door
- binary_sensor.back_door
- binary_sensor.side_door
- binary_sensor.garage_door
from: 'off'
condition:
- condition: state
@@ -155,11 +204,52 @@ automation:
action:
- service: script.jarvis_notify
data_template:
message: "The {{ trigger.to_state.attributes.friendly_name }} has been opened."
message: "My security protocols are being overidden,, The {{ trigger.to_state.attributes.friendly_name }} has been opened."
- service: script.text_alert
data_template:
title: "Security Alert!!"
message: "{{ trigger.to_state.attributes.friendly_name }} has been opened."
- service: input_boolean.turn_on
entity_id: input_boolean.security_issue
initial_state: true
- id: sentry_mode_enabled
alias: Sentry Mode Enabled Annoucement
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.sentry_mode
from: 'off'
to: 'on'
action:
- service: script.jarvis_voice
data:
message: >
{{ [
"Barn door protocol has been activated.",
"Anchorage House has been secured! ",
"Sentry Mode is active. ",
"I am now monitoring the doors and will let you know if anyone attempts to access."
] | random }}
- id: sentry_mode_disabled
alias: Sentry Mode Disabled Annoucement
initial_state: true
trigger:
- platform: state
entity_id: input_boolean.sentry_mode
from: 'on'
to: 'off'
action:
- service: script.jarvis_voice
data:
message: >
{{ [
"Barn door protocol has been deactivated.",
"I am no longer monitoring the access points. ",
"Sentry Mode has been switched off. "
] | random }}
script:
lockdown_issue:
sequence:
@@ -171,6 +261,10 @@ script:
state: "Away"
- service: input_boolean.turn_on
entity_id: input_boolean.lockdown_issue
- service: script.text_notify
data_template:
title: "Lockdown Issue!"
message: "Doors are open and it appears everyone has left!"
security_check_garage:
sequence:
@@ -205,18 +299,17 @@ script:
entity_id: input_boolean.sentry_mode
- service: input_boolean.turn_off
entity_id: input_boolean.security_issue
- service: input_boolean.turn_off
entity_id: input_boolean.lockdown_issue
- service: input_boolean.turn_off
entity_id: input_boolean.security_alarm
visitors_here:
sequence:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- service: input_boolean.turn_on
data:
entity_id: input_boolean.guest_mode
- service: shell_command.haunted_guest_welcome
#- service: shell_command.haunted_guest_welcome
visitors_gone:
sequence:
@@ -228,48 +321,74 @@ script:
sequence:
- service: shell_command.security_alarm
# notification_sentry_mode_activated_audio:
# sequence:
# - condition: state
# entity_id: input_boolean.audible_notifications
# state: 'on'
# - condition: state
# entity_id: media_player.hass_speaker
# state: 'idle'
# - service: tts.google_say
# entity_id: media_player.hass_speaker
# data_template:
# message: "Sentry mode activated"
notification_sentry_mode_activated_audio:
sequence:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: media_player.hass_speaker
state: 'idle'
- service: tts.google_say
entity_id: media_player.hass_speaker
data_template:
message: "Sentry mode activated"
notification_sentry_mode_deactivated_audio:
sequence:
- condition: state
entity_id: input_boolean.audible_notifications
state: 'on'
- condition: state
entity_id: media_player.hass_speaker
state: 'idle'
- service: tts.google_say
entity_id: media_player.hass_speaker
data_template:
message: "Sentry mode deactivated"
# notification_sentry_mode_deactivated_audio:
# sequence:
# - condition: state
# entity_id: input_boolean.audible_notifications
# state: 'on'
# - condition: state
# entity_id: media_player.hass_speaker
# state: 'idle'
# - service: tts.google_say
# entity_id: media_player.hass_speaker
# data_template:
# message: "Sentry mode deactivated"
notification_sentry_mode_deactiviated_text:
sequence:
- service: notify.jeff_ios
data:
message: Sentry Mode Deactivated
# notification_sentry_mode_deactiviated_text:
# sequence:
# - service: notify.jeff_ios
# data:
# message: Sentry Mode Deactivated
notification_sentry_mode_activiated_text:
sequence:
- service: notify.jeff_ios
data:
message: Sentry Mode Activated
# notification_sentry_mode_activiated_text:
# sequence:
# - service: notify.jeff_ios
# data:
# message: Sentry Mode Activated
vacation_canceled:
sequence:
- data:
entity_id: input_boolean.vacation_mode
service: input_boolean.turn_off
activate_barn_door_protocol:
sequence:
- service: script.jarvis_voice
data_template:
message: !include ../templates/jarvis_confirmations.yaml
- service: input_boolean.turn_on
entity_id: input_boolean.sentry_mode
deactivate_barn_door_protocol:
sequence:
- service: script.jarvis_voice
data_template:
message: !include ../templates/jarvis_confirmations.yaml
- service: input_boolean.turn_off
entity_id: input_boolean.sentry_mode
activate_guest_mode:
sequence:
- service: script.jarvis_voice
data_template:
message: !include ../templates/jarvis_confirmations.yaml
- delay:
seconds: 2
- service: input_boolean.turn_on
entity_id: input_boolean.guest_mode