Migrate template alarm control panel to new format
This commit is contained in:
@@ -51,79 +51,87 @@ input_datetime:
|
|||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
|
|
||||||
alarm_control_panel:
|
template:
|
||||||
- platform: template
|
- alarm_control_panel:
|
||||||
panels:
|
- name: Nerd Home Alarm Panel
|
||||||
nerdhome_alarm_panel:
|
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
||||||
name: Nerd Home Alarm Panel
|
code_arm_required: false
|
||||||
unique_id: d7eb8335-4998-49bf-957e-231aeed35179
|
arm_away:
|
||||||
value_template: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
- if:
|
||||||
code_arm_required: false
|
- condition: state
|
||||||
arm_away:
|
entity_id:
|
||||||
- if:
|
- binary_sensor.security_faults
|
||||||
- condition: state
|
state: 'off'
|
||||||
entity_id: binary_sensor.security_faults
|
match: all
|
||||||
state: 'off'
|
then:
|
||||||
then:
|
- target:
|
||||||
- service: alarm_control_panel.alarm_arm_away
|
entity_id:
|
||||||
target:
|
- alarm_control_panel.stratton_ave_alarm
|
||||||
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 and is_state('input_boolean.vacation_mode','off') }}"
|
|
||||||
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:
|
data:
|
||||||
code: !secret ring_alarm_code
|
code: !secret ring_alarm_code
|
||||||
- service: input_boolean.turn_off
|
action: alarm_control_panel.alarm_arm_away
|
||||||
target:
|
- target:
|
||||||
entity_id: input_boolean.lockdown_issue
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_off
|
||||||
|
else:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_on
|
||||||
|
arm_home:
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id:
|
||||||
|
- binary_sensor.security_faults
|
||||||
|
state: 'off'
|
||||||
|
match: all
|
||||||
|
then:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
action: alarm_control_panel.alarm_arm_home
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_off
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||||
then:
|
then:
|
||||||
- service: script.status_annc
|
- data:
|
||||||
data:
|
|
||||||
who: living_room
|
who: living_room
|
||||||
call_security_not_armed: 1
|
call_security_armed: 1
|
||||||
|
action: script.status_annc
|
||||||
template:
|
else:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_on
|
||||||
|
disarm:
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- alarm_control_panel.stratton_ave_alarm
|
||||||
|
data:
|
||||||
|
code: !secret ring_alarm_code
|
||||||
|
action: alarm_control_panel.alarm_disarm
|
||||||
|
- target:
|
||||||
|
entity_id:
|
||||||
|
- input_boolean.lockdown_issue
|
||||||
|
action: input_boolean.turn_off
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ silent != 1 and is_state('input_boolean.vacation_mode','off') }}"
|
||||||
|
then:
|
||||||
|
- data:
|
||||||
|
who: living_room
|
||||||
|
call_security_not_armed: 1
|
||||||
|
action: script.status_annc
|
||||||
|
code_format: number
|
||||||
|
default_entity_id: alarm_control_panel.nerdhome_alarm_panel
|
||||||
|
state: "{{ states('alarm_control_panel.stratton_ave_alarm') }}"
|
||||||
- binary_sensor:
|
- binary_sensor:
|
||||||
- name: Windows
|
- name: Windows
|
||||||
unique_id: 9ff34cd4-c450-45d2-934a-b4a9fd8b93b2
|
unique_id: 9ff34cd4-c450-45d2-934a-b4a9fd8b93b2
|
||||||
|
|||||||
Reference in New Issue
Block a user