Various fixes because uh oops, end of school year stuff exists

This commit is contained in:
2023-06-01 01:06:35 -04:00
parent fa4b801c17
commit b37108eef5
2 changed files with 26 additions and 39 deletions

View File

@ -260,8 +260,8 @@ 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 -%}
Today is the first day of Summer Break!
{%- endif %}
{% elif method == 'text' %}
{% if is_state('input_boolean.school_in_session','on') %}
{% if is_state('input_boolean.kallen_school_today','on') %}
{% if is_state('input_boolean.two_hour_delay','on') %}
School is currently under a two hour delay for Kallen.
@ -287,6 +287,7 @@ Tony does not have a stream scheduled today. The next scheduled stream is in {{
Kallen does not have school today.
{% endif %}
{% endif %}
{% endif %}
{% endmacro %}
{% macro kallenSleep(method) %}

View File

@ -329,15 +329,12 @@ automation:
alias: End of School Year
initial_state: true
trigger:
- platform: time
at: input_datetime.school_last_day
condition:
- condition: state
entity_id: input_boolean.school_in_session
state: 'on'
- platform: template
value_template: "{{ states('sensor.school_end_days2go') | int == -1 }}"
action:
- service: script.turn_on
entity_id: script.school_year_over
- service: input_boolean.turn_off
target:
entity_id: input_boolean.school_in_session
- id: 068c20ee-23ba-4cd5-af31-dcfff7bdbfed
alias: Kallen Two Hour Delay
@ -484,14 +481,3 @@ script:
- service: input_boolean.turn_on
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