Template alarm control panel
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: b7faab6866...b3b403216e
@ -160,7 +160,9 @@ automation:
|
|||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: security-yes
|
id: security-yes
|
||||||
then:
|
then:
|
||||||
- service: script.security_arm_home
|
- service: alarm_control_panel.alarm_arm_home
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
- alias: 'If no, leave security alone'
|
- alias: 'If no, leave security alone'
|
||||||
if:
|
if:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
|
@ -912,7 +912,9 @@ script:
|
|||||||
- service: media_player.turn_off
|
- service: media_player.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.living_room_tv
|
entity_id: media_player.living_room_tv
|
||||||
- service: script.security_arm_away
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
else:
|
else:
|
||||||
- stop: Away Mode Skipped
|
- stop: Away Mode Skipped
|
||||||
mode: single
|
mode: single
|
||||||
@ -961,7 +963,9 @@ script:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- script.welcome_home
|
- script.welcome_home
|
||||||
- script.volume_reset
|
- script.volume_reset
|
||||||
- service: script.security_disarm
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
@ -1028,7 +1032,9 @@ script:
|
|||||||
entity_id:
|
entity_id:
|
||||||
- script.welcome_home
|
- script.welcome_home
|
||||||
- script.volume_reset
|
- script.volume_reset
|
||||||
- service: script.security_disarm
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
- service: switch.turn_off
|
- service: switch.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
|
@ -32,13 +32,6 @@ input_boolean:
|
|||||||
security_issue:
|
security_issue:
|
||||||
name: Security Issue
|
name: Security Issue
|
||||||
icon: mdi:alert-circle-outline
|
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
|
|
||||||
skip_disarm:
|
skip_disarm:
|
||||||
name: Skip Disarm
|
name: Skip Disarm
|
||||||
icon: mdi:security
|
icon: mdi:security
|
||||||
@ -58,6 +51,81 @@ input_datetime:
|
|||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
|
|
||||||
|
alarm_control_panel:
|
||||||
|
- platform: template
|
||||||
|
panels:
|
||||||
|
nerdhome_alarm_panel:
|
||||||
|
name: Nerd Home Alarm Panel
|
||||||
|
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
||||||
|
value_template: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
||||||
|
code_arm_required: false
|
||||||
|
arm_away:
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.security_faults
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
else:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
arm_home:
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.security_faults
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- service: alarm_control_panel.alarm_arm_home
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ silent != 1 }}"
|
||||||
|
then:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: living_room
|
||||||
|
call_security_armed: 1
|
||||||
|
else:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
disarm:
|
||||||
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ silent != 1 }}"
|
||||||
|
then:
|
||||||
|
- service: script.status_annc
|
||||||
|
data:
|
||||||
|
who: living_room
|
||||||
|
call_security_not_armed: 1
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: template
|
- platform: template
|
||||||
sensors:
|
sensors:
|
||||||
@ -198,12 +266,16 @@ automation:
|
|||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.kallen_school_today
|
entity_id: input_boolean.kallen_school_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- service: script.security_disarm
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: wakeup
|
id: wakeup
|
||||||
sequence:
|
sequence:
|
||||||
- service: script.security_disarm
|
- service: alarm_control_panel.alarm_disarm
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
|
|
||||||
- id: f51eb02f-3f44-4b5d-a389-762b8ca88e2a
|
- id: f51eb02f-3f44-4b5d-a389-762b8ca88e2a
|
||||||
alias: Scheduled Alarm Rearm
|
alias: Scheduled Alarm Rearm
|
||||||
@ -282,7 +354,9 @@ automation:
|
|||||||
after: '04:15'
|
after: '04:15'
|
||||||
before: '13:30'
|
before: '13:30'
|
||||||
then:
|
then:
|
||||||
- service: script.security_arm_home
|
- service: alarm_control_panel.alarm_arm_home
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
|
|
||||||
- id: c7927c59-e0fe-48b9-b308-dd90fb774920
|
- id: c7927c59-e0fe-48b9-b308-dd90fb774920
|
||||||
alias: Lockdown Issue
|
alias: Lockdown Issue
|
||||||
@ -381,9 +455,13 @@ automation:
|
|||||||
entity_id: group.adults
|
entity_id: group.adults
|
||||||
state: 'not_home'
|
state: 'not_home'
|
||||||
then:
|
then:
|
||||||
- service: script.security_arm_away
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
else:
|
else:
|
||||||
- service: script.security_arm_home
|
- service: alarm_control_panel.alarm_arm_home
|
||||||
|
target:
|
||||||
|
entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
else:
|
else:
|
||||||
- service: script.speech_engine
|
- service: script.speech_engine
|
||||||
data:
|
data:
|
||||||
@ -417,115 +495,36 @@ automation:
|
|||||||
- input_boolean.skip_disarm
|
- input_boolean.skip_disarm
|
||||||
- input_boolean.skip_rearm
|
- input_boolean.skip_rearm
|
||||||
|
|
||||||
- id: 8ae8384f-1540-4b6e-bd08-e81807ff0bcd
|
- id: ea52c580-dcf4-4eec-8d25-adda3b9e7cf4
|
||||||
alias: Security Boolean Handling
|
alias: Alexa Guard Handling
|
||||||
description: Handle the toggles that provide context for the current security mode
|
description: Sync state of Alexa guard with state of main alarm system
|
||||||
|
mode: restart
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||||
to: disarmed
|
state: 'armed_away'
|
||||||
|
id: away
|
||||||
|
- platform: state
|
||||||
|
entity_id: alarm_control_panel.stratton_ave_alarm
|
||||||
|
state: 'disarmed'
|
||||||
|
id: disarmed
|
||||||
|
condition:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
state: 'off'
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_off
|
- choose:
|
||||||
target:
|
- conditions:
|
||||||
entity_id:
|
- condition: trigger
|
||||||
- input_boolean.security_armed_home
|
id: away
|
||||||
- input_boolean.security_armed_away
|
sequence:
|
||||||
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
script:
|
target:
|
||||||
security_arm_home:
|
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
||||||
alias: Security Arm - Home
|
- conditions:
|
||||||
sequence:
|
- conditions: trigger
|
||||||
- if:
|
id: disarmed
|
||||||
- condition: state
|
sequence:
|
||||||
entity_id: binary_sensor.security_faults
|
- service: alarm_control_panel.alarm_disarm
|
||||||
state: 'off'
|
target:
|
||||||
then:
|
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
||||||
- service: alarm_control_panel.alarm_arm_home
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
|
||||||
data:
|
|
||||||
code: !secret ring_alarm_code
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id:
|
|
||||||
- input_boolean.lockdown_issue
|
|
||||||
- input_boolean.security_armed_away
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.security_armed_home
|
|
||||||
- if:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ silent != 1 }}"
|
|
||||||
then:
|
|
||||||
- service: script.status_annc
|
|
||||||
data:
|
|
||||||
who: living_room
|
|
||||||
call_security_armed: 1
|
|
||||||
else:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.lockdown_issue
|
|
||||||
|
|
||||||
security_arm_away:
|
|
||||||
alias: Security Arm - Away
|
|
||||||
sequence:
|
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: binary_sensor.security_faults
|
|
||||||
state: 'off'
|
|
||||||
then:
|
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
|
||||||
data:
|
|
||||||
code: !secret ring_alarm_code
|
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
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:
|
|
||||||
entity_id: input_boolean.lockdown_issue
|
|
||||||
|
|
||||||
security_disarm:
|
|
||||||
alias: Security Disarm
|
|
||||||
sequence:
|
|
||||||
- service: alarm_control_panel.alarm_disarm
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
|
||||||
data:
|
|
||||||
code: !secret ring_alarm_code
|
|
||||||
- service: alarm_control_panel.alarm_disarm
|
|
||||||
target:
|
|
||||||
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: input_boolean.lockdown_issue
|
|
||||||
- if:
|
|
||||||
- condition: and
|
|
||||||
conditions:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.security_armed_home
|
|
||||||
state: 'on'
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ silent != 1 }}"
|
|
||||||
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