Better handling of school early release
This commit is contained in:
@ -267,7 +267,11 @@ script:
|
|||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.school_today','on') %}
|
||||||
|
{% if is_state('input_boolean.school_early_release','on') %}
|
||||||
|
13:15
|
||||||
|
{% else %}
|
||||||
14:15
|
14:15
|
||||||
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.school_today','off') and is_state('input_boolean.work_today','off') %}
|
{% elif is_state('input_boolean.school_today','off') and is_state('input_boolean.work_today','off') %}
|
||||||
15:00
|
15:00
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -319,7 +323,7 @@ script:
|
|||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.school_today','on') %}
|
||||||
{% if is_state('input_boolean.school_early_release','on') %}
|
{% if is_state('input_boolean.school_early_release','on') %}
|
||||||
13:00
|
12:30
|
||||||
{% else %}
|
{% else %}
|
||||||
13:30
|
13:30
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -167,13 +167,30 @@ automation:
|
|||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.school_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
action:
|
action:
|
||||||
- service: script.security_arm_home
|
|
||||||
- if:
|
- if:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.work_today
|
entity_id: input_boolean.work_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
then:
|
then:
|
||||||
- service: script.security_scheduling
|
- service: script.security_scheduling
|
||||||
|
- if:
|
||||||
|
- condition: and
|
||||||
|
conditions:
|
||||||
|
- condition: time
|
||||||
|
before: "14:00:00"
|
||||||
|
after: "12:00:00"
|
||||||
|
weekday:
|
||||||
|
- mon
|
||||||
|
- tue
|
||||||
|
- wed
|
||||||
|
- thu
|
||||||
|
- fri
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.school_early_release
|
||||||
|
state: "on"
|
||||||
|
then:
|
||||||
|
- stop: School early release
|
||||||
|
- service: script.security_arm_home
|
||||||
|
|
||||||
- id: c7927c59-e0fe-48b9-b308-dd90fb774920
|
- id: c7927c59-e0fe-48b9-b308-dd90fb774920
|
||||||
alias: Lockdown Issue
|
alias: Lockdown Issue
|
||||||
|
Reference in New Issue
Block a user