Added contextual awareness for security automations
This commit is contained in:
@ -32,6 +32,13 @@ input_boolean:
|
||||
security_issue:
|
||||
name: Security Issue
|
||||
icon: mdi:alert-circle-outline
|
||||
# These booleans will only provide status/context for automation purposes. They will NOT actually control the security system.
|
||||
security_armed_home:
|
||||
name: Security Armed Home
|
||||
icon: mdi:shield-home
|
||||
security_armed_away:
|
||||
name: Security Armed Away
|
||||
icon: mdi:security
|
||||
|
||||
input_datetime:
|
||||
morning_alarm_disarm:
|
||||
@ -290,16 +297,12 @@ automation:
|
||||
then:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.people_present
|
||||
state: 'off'
|
||||
entity_id: group.adults
|
||||
state: 'not_home'
|
||||
then:
|
||||
- service: script.security_arm_away
|
||||
else:
|
||||
- service: script.security_arm_home
|
||||
- service: script.status_annc
|
||||
data_template:
|
||||
who: common
|
||||
call_security_armed: 1
|
||||
else:
|
||||
- service: script.speech_engine
|
||||
data:
|
||||
@ -373,7 +376,12 @@ script:
|
||||
code: !secret ring_alarm_code
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
- input_boolean.security_armed_away
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.security_armed_home
|
||||
- service: script.status_annc
|
||||
data:
|
||||
who: living_room
|
||||
@ -401,7 +409,12 @@ script:
|
||||
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
entity_id:
|
||||
- input_boolean.lockdown_issue
|
||||
- input_boolean.security_armed_home
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.security_armed_away
|
||||
else:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
@ -421,7 +434,19 @@ script:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.lockdown_issue
|
||||
- service: script.status_annc
|
||||
data:
|
||||
who: living_room
|
||||
call_security_not_armed: 1
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.security_armed_home
|
||||
state: 'on'
|
||||
then:
|
||||
- service: script.status_annc
|
||||
data:
|
||||
who: living_room
|
||||
call_security_not_armed: 1
|
||||
- delay:
|
||||
seconds: 1
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- input_boolean.security_armed_home
|
||||
- input_boolean.security_armed_away
|
Reference in New Issue
Block a user