Various fixes because uh oops, end of school year stuff exists
This commit is contained in:
@ -260,31 +260,32 @@ Tony does not have a stream scheduled today. The next scheduled stream is in {{
|
|||||||
{% if count_the_days('input_datetime.school_last_day') | int == -1 -%}
|
{% if count_the_days('input_datetime.school_last_day') | int == -1 -%}
|
||||||
Today is the first day of Summer Break!
|
Today is the first day of Summer Break!
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
{% elif method == 'text' %}
|
{% elif method == 'text' %}
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
{% if is_state('input_boolean.school_in_session','on') %}
|
||||||
{% if is_state('input_boolean.two_hour_delay','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
School is currently under a two hour delay for Kallen.
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
{% elif is_state('input_boolean.kallen_at_school','on') %}
|
School is currently under a two hour delay for Kallen.
|
||||||
Kallen is at school right now.
|
{% elif is_state('input_boolean.kallen_at_school','on') %}
|
||||||
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
Kallen is at school right now.
|
||||||
{{ states('input_text.kallen_pickup') }} will be picking him up from school today.
|
{% if is_state('input_boolean.kallen_alternate_pickup','on') %}
|
||||||
{% elif is_state('input_boolean.kallen_school_early_release','on') %}
|
{{ states('input_text.kallen_pickup') }} will be picking him up from school today.
|
||||||
The school is on an early release schedule, pickup is at {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }} today.
|
{% elif is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
|
The school is on an early release schedule, pickup is at {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }} today.
|
||||||
|
{% else %}
|
||||||
|
His pickup time is {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }} today.
|
||||||
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
His pickup time is {{ input_datetime_12hr('input_datetime.kallen_school_day_end') }} today.
|
Kallen has school at {{ input_datetime_12hr('input_datetime.kallen_school_day_start') }} today.
|
||||||
|
{% endif %}
|
||||||
|
{% elif is_state('input_boolean.school_cancelled','on') %}
|
||||||
|
School is cancelled today for Kallen.
|
||||||
|
{% elif is_state('input_boolean.kallen_school_today_extended','on') and is_state('input_boolean.kallen_school_today','off') %}
|
||||||
|
{% if (ct > wakeup) and (ct < bedtime) %}
|
||||||
|
Kallen has finished his school day.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
Kallen has school at {{ input_datetime_12hr('input_datetime.kallen_school_day_start') }} today.
|
Kallen does not have school today.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.school_cancelled','on') %}
|
|
||||||
School is cancelled today for Kallen.
|
|
||||||
{% elif is_state('input_boolean.kallen_school_today_extended','on') and is_state('input_boolean.kallen_school_today','off') %}
|
|
||||||
{% if (ct > wakeup) and (ct < bedtime) %}
|
|
||||||
Kallen has finished his school day.
|
|
||||||
{% endif %}
|
|
||||||
{% else %}
|
|
||||||
Kallen does not have school today.
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
@ -329,15 +329,12 @@ automation:
|
|||||||
alias: End of School Year
|
alias: End of School Year
|
||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: template
|
||||||
at: input_datetime.school_last_day
|
value_template: "{{ states('sensor.school_end_days2go') | int == -1 }}"
|
||||||
condition:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.school_in_session
|
|
||||||
state: 'on'
|
|
||||||
action:
|
action:
|
||||||
- service: script.turn_on
|
- service: input_boolean.turn_off
|
||||||
entity_id: script.school_year_over
|
target:
|
||||||
|
entity_id: input_boolean.school_in_session
|
||||||
|
|
||||||
- id: 068c20ee-23ba-4cd5-af31-dcfff7bdbfed
|
- id: 068c20ee-23ba-4cd5-af31-dcfff7bdbfed
|
||||||
alias: Kallen Two Hour Delay
|
alias: Kallen Two Hour Delay
|
||||||
@ -484,14 +481,3 @@ script:
|
|||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.school_in_session
|
entity_id: input_boolean.school_in_session
|
||||||
|
|
||||||
school_year_over:
|
|
||||||
alias: 'School Year Over'
|
|
||||||
sequence:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.school_in_session
|
|
||||||
state: 'on'
|
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{{ states('input_datetime.school_last_day') == now().strftime("%Y-%m-%d") }}
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
entity_id: input_boolean.school_in_session
|
|
Reference in New Issue
Block a user