Now using lockdown issue toggle #60
This commit is contained in:
@ -957,6 +957,35 @@ script:
|
|||||||
</p>
|
</p>
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro lockdown_issue() %}
|
||||||
|
<p>
|
||||||
|
{{ [
|
||||||
|
'There are active security faults. Please close all doors and windows before arming.',
|
||||||
|
'Have you ever tried to secure a piece of Swiss cheese? It does not work. Please close all doors and windows.',
|
||||||
|
'I cannot guard an open window. Please close them, and check all doors as well.'
|
||||||
|
'Do you want me to be attacked by the local gang of feral infants? Close the doors and windows!'
|
||||||
|
] | random }}
|
||||||
|
</p>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro security_armed() %}
|
||||||
|
<p>
|
||||||
|
{{ [ 'Security is armed, guard dogs deployed, and lasers set from stun to kill!',
|
||||||
|
'The security system is armed. Sentry turrets active, be careful out there!',
|
||||||
|
'Your security is our number one priority. Flamethrower turrets deployed!'
|
||||||
|
] | random }}
|
||||||
|
</p>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro security_not_armed() %}
|
||||||
|
<p>
|
||||||
|
{{ [ "Security squadron is standing down, but always at your service!",
|
||||||
|
"Our security forces are currently twiddling their thumbs, awaiting some purpose in their life!",
|
||||||
|
"Security not armed. Hopefully the defense turrets do not become bored!"
|
||||||
|
] | random }}
|
||||||
|
</p>
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro time_is() %}
|
{% macro time_is() %}
|
||||||
<p>
|
<p>
|
||||||
It is {{ now().strftime("%I:%M %p") }}
|
It is {{ now().strftime("%I:%M %p") }}
|
||||||
@ -1127,6 +1156,18 @@ script:
|
|||||||
{{ issue() }}
|
{{ issue() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if call_lockdown_issue == 1 %}
|
||||||
|
{{ lockdown_issue() }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if call_security_armed == 1 %}
|
||||||
|
{{ security_armed() }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if call_security_not_armed == 1 %}
|
||||||
|
{{ security_not_armed() }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if call_time_is == 1 %}
|
{% if call_time_is == 1 %}
|
||||||
{{ time_is() }}
|
{{ time_is() }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -195,6 +195,35 @@ automation:
|
|||||||
then:
|
then:
|
||||||
- service: script.security_scheduling
|
- service: script.security_scheduling
|
||||||
|
|
||||||
|
- id: c7927c59-e0fe-48b9-b308-dd90fb774920
|
||||||
|
alias: Lockdown Issue
|
||||||
|
trigger:
|
||||||
|
- platform: state
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
from: "off"
|
||||||
|
to: "on"
|
||||||
|
action:
|
||||||
|
- service: script.status_annc
|
||||||
|
data_template:
|
||||||
|
who: common
|
||||||
|
call_interruption: 1
|
||||||
|
call_lockdown_issue: 1
|
||||||
|
- wait_template: "{{ is_state('sensor.total_faults','0') }}"
|
||||||
|
timeout:
|
||||||
|
minutes: 10
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: binary_sensor.people_present
|
||||||
|
state: 'off'
|
||||||
|
then:
|
||||||
|
- service: script.security_arm_away
|
||||||
|
else:
|
||||||
|
- service: script.security_arm_home
|
||||||
|
- service: script.status_annc
|
||||||
|
data_template:
|
||||||
|
who: common
|
||||||
|
call_security_armed: 1
|
||||||
|
|
||||||
script:
|
script:
|
||||||
security_arm_home:
|
security_arm_home:
|
||||||
alias: Security Arm - Home
|
alias: Security Arm - Home
|
||||||
@ -209,16 +238,18 @@ script:
|
|||||||
entity_id: alarm_control_panel.stratton_ave_alarm
|
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
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
else:
|
else:
|
||||||
- service: script.speech_engine
|
|
||||||
data:
|
|
||||||
who: common
|
|
||||||
message: 'There are active security faults. Please close all doors and windows before arming.'
|
|
||||||
- service: script.text_urgent_alert
|
- service: script.text_urgent_alert
|
||||||
data:
|
data:
|
||||||
who: 'parents'
|
who: 'parents'
|
||||||
title: 'Security Not Armed!'
|
title: 'Security Not Armed!'
|
||||||
message: 'There are active security faults. Please close all doors and windows before arming.'
|
message: 'There are active security faults. Please close all doors and windows before arming.'
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
|
||||||
security_arm_away:
|
security_arm_away:
|
||||||
alias: Security Arm - Away
|
alias: Security Arm - Away
|
||||||
@ -236,16 +267,18 @@ script:
|
|||||||
- service: alarm_control_panel.alarm_arm_away
|
- service: alarm_control_panel.alarm_arm_away
|
||||||
target:
|
target:
|
||||||
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
else:
|
else:
|
||||||
- service: script.speech_engine
|
|
||||||
data:
|
|
||||||
who: common
|
|
||||||
message: 'There are active security faults. Please close all doors and windows before arming.'
|
|
||||||
- service: script.text_urgent_alert
|
- service: script.text_urgent_alert
|
||||||
data:
|
data:
|
||||||
who: 'parents'
|
who: 'parents'
|
||||||
title: 'Security Not Armed!'
|
title: 'Security Not Armed!'
|
||||||
message: 'There are active security faults. Please close all doors and windows before arming.'
|
message: 'There are active security faults. Please close all doors and windows before arming.'
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
||||||
|
|
||||||
security_disarm:
|
security_disarm:
|
||||||
alias: Security Disarm
|
alias: Security Disarm
|
||||||
@ -257,4 +290,7 @@ script:
|
|||||||
code: !secret ring_alarm_code
|
code: !secret ring_alarm_code
|
||||||
- service: alarm_control_panel.alarm_disarm
|
- service: alarm_control_panel.alarm_disarm
|
||||||
target:
|
target:
|
||||||
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
entity_id: alarm_control_panel.alexa_guard_9ee3b
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.lockdown_issue
|
Reference in New Issue
Block a user