School cancel and delay entities back to generalized form
No need for them to be individualized since all schools in the same district follow the same calls...
This commit is contained in:
@ -167,7 +167,7 @@ script:
|
|||||||
entity_id: input_datetime.kallen_school_day_start
|
entity_id: input_datetime.kallen_school_day_start
|
||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
11:00
|
11:00
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
||||||
@ -179,7 +179,7 @@ script:
|
|||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
09:30
|
09:30
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 5400) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 5400) | timestamp_custom('%H:%M', false) }}
|
||||||
@ -193,7 +193,7 @@ script:
|
|||||||
data:
|
data:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
Common Areas
|
Common Areas
|
||||||
{% else %}
|
{% else %}
|
||||||
Kallen Bedroom
|
Kallen Bedroom
|
||||||
@ -206,7 +206,7 @@ script:
|
|||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
09:40
|
09:40
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 4800) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 4800) | timestamp_custom('%H:%M', false) }}
|
||||||
@ -218,7 +218,7 @@ script:
|
|||||||
entity_id: input_datetime.kallen_school_day_start_reminder
|
entity_id: input_datetime.kallen_school_day_start_reminder
|
||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
10:00
|
10:00
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||||
@ -296,7 +296,7 @@ script:
|
|||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
10:20
|
10:20
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2400) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2400) | timestamp_custom('%H:%M', false) }}
|
||||||
|
@ -14,10 +14,10 @@ input_boolean:
|
|||||||
kallen_school_today_extended:
|
kallen_school_today_extended:
|
||||||
name: Kallen School Today Extended
|
name: Kallen School Today Extended
|
||||||
icon: mdi:bus-school
|
icon: mdi:bus-school
|
||||||
kallen_two_hour_delay:
|
two_hour_delay:
|
||||||
name: Kallen Two Hour Delay
|
name: Kallen Two Hour Delay
|
||||||
icon: mdi:bus-clock
|
icon: mdi:bus-clock
|
||||||
kallen_school_cancelled:
|
school_cancelled:
|
||||||
name: Kallen School Cancelled
|
name: Kallen School Cancelled
|
||||||
icon: mdi:calendar-remove
|
icon: mdi:calendar-remove
|
||||||
kallen_band_practice:
|
kallen_band_practice:
|
||||||
@ -316,7 +316,7 @@ automation:
|
|||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: input_boolean.kallen_two_hour_delay
|
entity_id: input_boolean.two_hour_delay
|
||||||
from: 'off'
|
from: 'off'
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
@ -348,14 +348,14 @@ automation:
|
|||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: input_boolean.kallen_school_cancelled
|
entity_id: input_boolean.school_cancelled
|
||||||
from: 'off'
|
from: 'off'
|
||||||
to: 'on'
|
to: 'on'
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.kallen_two_hour_delay
|
- input_boolean.two_hour_delay
|
||||||
- input_boolean.kallen_school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.kallen_school_early_release
|
- input_boolean.kallen_school_early_release
|
||||||
- input_boolean.kallen_school_today_extended
|
- input_boolean.kallen_school_today_extended
|
||||||
@ -432,8 +432,8 @@ script:
|
|||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.kallen_school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.kallen_two_hour_delay
|
- input_boolean.two_hour_delay
|
||||||
- input_boolean.kallen_school_cancelled
|
- input_boolean.school_cancelled
|
||||||
|
|
||||||
kallen_school_reset_late:
|
kallen_school_reset_late:
|
||||||
alias: 'Kallen School Reset Late'
|
alias: 'Kallen School Reset Late'
|
||||||
|
@ -322,7 +322,7 @@
|
|||||||
'Collin has school today.',
|
'Collin has school today.',
|
||||||
'It is a school day. '
|
'It is a school day. '
|
||||||
] | random }}
|
] | random }}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
'But there was a two hour delay. '
|
'But there was a two hour delay. '
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -331,7 +331,7 @@
|
|||||||
And It is early release!
|
And It is early release!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_school_cancelled','on') %}
|
{% if is_state('input_boolean.school_cancelled','on') %}
|
||||||
'School has been cancelled for today. '
|
'School has been cancelled for today. '
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %}
|
{% if states.sensor.thanksgiving_break_days2go.state | int <= 14 and states.sensor.thanksgiving_break_days2go.state | int > 0 %}
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
'Today, you get to attend your favorite place. Just kidding. It is a school day. ',
|
'Today, you get to attend your favorite place. Just kidding. It is a school day. ',
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
{{ [
|
{{ [
|
||||||
'School will be starting two hours late today, as you are likely already aware. ',
|
'School will be starting two hours late today, as you are likely already aware. ',
|
||||||
'Your school superintendant has decided to sleep in this morning. He also decided to let you do the same. What a guy! ',
|
'Your school superintendant has decided to sleep in this morning. He also decided to let you do the same. What a guy! ',
|
||||||
@ -99,7 +99,7 @@
|
|||||||
] | random }} {{ states('sensor.kallen_lunch_menu_items') }}.
|
] | random }} {{ states('sensor.kallen_lunch_menu_items') }}.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_school_today', 'off') %}
|
{% if is_state('input_boolean.kallen_school_today', 'off') %}
|
||||||
{% if is_state('input_boolean.kallen_school_cancelled','on') %}
|
{% if is_state('input_boolean.school_cancelled','on') %}
|
||||||
{{ [
|
{{ [
|
||||||
"It turns out you will not be attending school today after all. ",
|
"It turns out you will not be attending school today after all. ",
|
||||||
"The school has decided not to open today. ",
|
"The school has decided not to open today. ",
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
"Hello Collin, "
|
"Hello Collin, "
|
||||||
|
|
||||||
{% if is_state('input_boolean.kallen_school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.two_hour_delay','on') %}
|
||||||
"You have school today, but there is currently a two hour delay. "
|
"You have school today, but there is currently a two hour delay. "
|
||||||
{% else %}
|
{% else %}
|
||||||
"You have school today, and it is running on time. "
|
"You have school today, and it is running on time. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.kallen_school_cancelled','on') %}
|
{% elif is_state('input_boolean.school_cancelled','on') %}
|
||||||
"School has been cancelled for today! Enjoy the unexpected day off! "
|
"School has been cancelled for today! Enjoy the unexpected day off! "
|
||||||
{% else %}
|
{% else %}
|
||||||
"You do not have school today. Enjoy your day off! "
|
"You do not have school today. Enjoy your day off! "
|
||||||
|
@ -43,7 +43,7 @@
|
|||||||
'You did not achieve eighth position this morning, did you? ',
|
'You did not achieve eighth position this morning, did you? ',
|
||||||
] | random }}
|
] | random }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.kallen_school_cancelled','on') and is_state('person.kallen_stork','home') %}
|
{% elif is_state('input_boolean.school_cancelled','on') and is_state('person.kallen_stork','home') %}
|
||||||
"I hope you are enjoying your free day off from school, Collin. "
|
"I hope you are enjoying your free day off from school, Collin. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
Reference in New Issue
Block a user