Continuing to slowly implement the intentions of #53
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: e1c849d2ee...7cd914eb22
@ -197,7 +197,7 @@ automation:
|
|||||||
to: 'on'
|
to: 'on'
|
||||||
condition:
|
condition:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.kallen_school_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.kallen_overnight
|
entity_id: input_boolean.kallen_overnight
|
||||||
|
@ -234,7 +234,7 @@ automation:
|
|||||||
entity_id: input_boolean.kallen_at_school
|
entity_id: input_boolean.kallen_at_school
|
||||||
state: "off"
|
state: "off"
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.kallen_school_today
|
||||||
state: "on"
|
state: "on"
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
|
@ -159,7 +159,7 @@ script:
|
|||||||
alias: 'Kallen Scheduling Morning'
|
alias: 'Kallen Scheduling Morning'
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
entity_id: input_datetime.school_day_start
|
entity_id: input_datetime.kallen_school_day_start
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
||||||
@ -173,11 +173,11 @@ script:
|
|||||||
entity_id: input_datetime.kallen_wakeup_time
|
entity_id: input_datetime.kallen_wakeup_time
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.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.kallen_two_hour_delay','on') %}
|
||||||
09:30
|
09:30
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.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) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
10:00
|
10:00
|
||||||
@ -187,7 +187,7 @@ script:
|
|||||||
entity_id: input_select.kallen_morning_briefing_location
|
entity_id: input_select.kallen_morning_briefing_location
|
||||||
data_template:
|
data_template:
|
||||||
option: >
|
option: >
|
||||||
{% if is_state('input_boolean.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.kallen_two_hour_delay','on') %}
|
||||||
Common Areas
|
Common Areas
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -200,29 +200,29 @@ script:
|
|||||||
entity_id: input_datetime.kallen_morning_briefing
|
entity_id: input_datetime.kallen_morning_briefing
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.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.kallen_two_hour_delay','on') %}
|
||||||
09:40
|
09:40
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.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) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
10:00
|
10:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
entity_id: input_datetime.school_day_start_reminder
|
entity_id: input_datetime.kallen_school_day_start_reminder
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
{% if is_state('input_boolean.kallen_two_hour_delay','on') %}
|
||||||
10:00
|
10:00
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.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) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
entity_id: input_datetime.school_day_end_reminder
|
entity_id: input_datetime.kallen_school_day_end_reminder
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_early_release','on') %}
|
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
13:30
|
13:30
|
||||||
{% else %}
|
{% else %}
|
||||||
14:00
|
14:00
|
||||||
@ -269,8 +269,8 @@ script:
|
|||||||
entity_id: input_datetime.audible_notification_on
|
entity_id: input_datetime.audible_notification_on
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{{ (state_attr('input_datetime.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) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
09:00
|
09:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -278,13 +278,13 @@ script:
|
|||||||
entity_id: input_datetime.morning_report
|
entity_id: input_datetime.morning_report
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.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.kallen_two_hour_delay','on') %}
|
||||||
10:20
|
10:20
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.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) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
||||||
{% if (state_attr('input_datetime.tina_workday_start','timestamp')) > 43200 %}
|
{% if (state_attr('input_datetime.tina_workday_start','timestamp')) > 43200 %}
|
||||||
12:00
|
12:00
|
||||||
{% elif (state_attr('input_datetime.tina_workday_start','timestamp') - 1500 ) > (state_attr('input_datetime.audible_notification_on','timestamp')) %}
|
{% elif (state_attr('input_datetime.tina_workday_start','timestamp') - 1500 ) > (state_attr('input_datetime.audible_notification_on','timestamp')) %}
|
||||||
@ -299,13 +299,13 @@ script:
|
|||||||
entity_id: input_datetime.daily_report
|
entity_id: input_datetime.daily_report
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.school_early_release','on') %}
|
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
13:15
|
13:15
|
||||||
{% else %}
|
{% else %}
|
||||||
14:15
|
14:15
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.school_today','off') and is_state('input_boolean.work_today','off') %}
|
{% elif is_state('input_boolean.kallen_school_today','off') and is_state('input_boolean.work_today','off') %}
|
||||||
15:00
|
15:00
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if (state_attr('input_datetime.tina_workday_end','timestamp')) > 61200 %}
|
{% if (state_attr('input_datetime.tina_workday_end','timestamp')) > 61200 %}
|
||||||
@ -372,8 +372,8 @@ script:
|
|||||||
entity_id: input_datetime.master_bedroom_wakeup
|
entity_id: input_datetime.master_bedroom_wakeup
|
||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.school_early_release','on') %}
|
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
12:30
|
12:30
|
||||||
{% else %}
|
{% else %}
|
||||||
13:30
|
13:30
|
||||||
@ -486,20 +486,20 @@ script:
|
|||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% set ct = ((now().hour * 60 + now().minute) * 60 ) %}
|
{% set ct = ((now().hour * 60 + now().minute) * 60 ) %}
|
||||||
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if ct > state_attr('input_datetime.school_day_start','timestamp') %}
|
{% if ct > state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif ct > state_attr('input_datetime.tina_workday_start','timestamp') and ct < state_attr('input_datetime.school_day_start','timestamp') %}
|
{% elif ct > state_attr('input_datetime.tina_workday_start','timestamp') and ct < state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||||
{{ (state_attr('input_datetime.school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif state_attr('input_datetime.tina_workday_start','timestamp') < (state_attr('input_datetime.school_day_start','timestamp')) %}
|
{% elif state_attr('input_datetime.tina_workday_start','timestamp') < (state_attr('input_datetime.kallen_school_day_start','timestamp')) %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_start','timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif is_state('input_boolean.school_today','on') %}
|
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{{ (state_attr('input_datetime.school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
11:00
|
11:00
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -508,20 +508,20 @@ script:
|
|||||||
data_template:
|
data_template:
|
||||||
time: >
|
time: >
|
||||||
{% set ct = ((now().hour * 60 + now().minute) * 60 ) %}
|
{% set ct = ((now().hour * 60 + now().minute) * 60 ) %}
|
||||||
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','off') %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 900) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 900) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif is_state('input_boolean.school_today','on') and is_state('input_boolean.work_today','off') %}
|
{% elif is_state('input_boolean.kallen_school_today','on') and is_state('input_boolean.work_today','off') %}
|
||||||
{{ (state_attr('input_datetime.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) }}
|
||||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','on') %}
|
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if ct > state_attr('input_datetime.school_day_start','timestamp') %}
|
{% if ct > state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 900) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 900) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif ct > state_attr('input_datetime.tina_workday_start','timestamp') and ct < state_attr('input_datetime.school_day_start','timestamp') %}
|
{% elif ct > state_attr('input_datetime.tina_workday_start','timestamp') and ct < state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||||
{{ (state_attr('input_datetime.school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') - 2700) | timestamp_custom('%H:%M', false) }}
|
||||||
{% elif state_attr('input_datetime.tina_workday_start','timestamp') < state_attr('input_datetime.school_day_start','timestamp') %}
|
{% elif state_attr('input_datetime.tina_workday_start','timestamp') < state_attr('input_datetime.kallen_school_day_start','timestamp') %}
|
||||||
{{ (state_attr('input_datetime.school_day_start','timestamp') + 1800) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') + 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if (state_attr('input_datetime.tina_workday_start','timestamp') - state_attr('input_datetime.school_day_start','timestamp')) > 5400 %}
|
{% if (state_attr('input_datetime.tina_workday_start','timestamp') - state_attr('input_datetime.kallen_school_day_start','timestamp')) > 5400 %}
|
||||||
{{ (state_attr('input_datetime.school_day_start','timestamp') + 1800) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.kallen_school_day_start','timestamp') + 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 900) | timestamp_custom('%H:%M', false) }}
|
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 900) | timestamp_custom('%H:%M', false) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -2,14 +2,14 @@ input_boolean:
|
|||||||
school_in_session:
|
school_in_session:
|
||||||
name: School In Session
|
name: School In Session
|
||||||
icon: mdi:bus-school
|
icon: mdi:bus-school
|
||||||
school_today:
|
kallen_school_today:
|
||||||
name: School Today
|
name: Kallen School Today
|
||||||
icon: mdi:bus-school
|
icon: mdi:bus-school
|
||||||
school_early_release:
|
kallen_school_early_release:
|
||||||
name: School Early Release
|
name: Kallen School Early Release
|
||||||
icon: mdi:bus-school
|
icon: mdi:bus-school
|
||||||
school_today_extended:
|
kallen_school_today_extended:
|
||||||
name: School Today Extended
|
name: Kallen School Today Extended
|
||||||
icon: mdi:bus-school
|
icon: mdi:bus-school
|
||||||
kallen_two_hour_delay:
|
kallen_two_hour_delay:
|
||||||
name: Kallen Two Hour Delay
|
name: Kallen Two Hour Delay
|
||||||
@ -32,12 +32,12 @@ input_datetime:
|
|||||||
has_date: true
|
has_date: true
|
||||||
has_time: false
|
has_time: false
|
||||||
icon: mdi:calendar
|
icon: mdi:calendar
|
||||||
school_day_start:
|
kallen_school_day_start:
|
||||||
name: School Day Start
|
name: School Day Start
|
||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:clock-start
|
icon: mdi:clock-start
|
||||||
school_day_end:
|
kallen_school_day_end:
|
||||||
name: School Day End
|
name: School Day End
|
||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
@ -57,12 +57,12 @@ input_datetime:
|
|||||||
has_date: true
|
has_date: true
|
||||||
has_time: false
|
has_time: false
|
||||||
icon: mdi:calendar-start
|
icon: mdi:calendar-start
|
||||||
school_day_start_reminder:
|
kallen_school_day_start_reminder:
|
||||||
name: School Day Start Reminder
|
name: School Day Start Reminder
|
||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
icon: mdi:clock-alert
|
icon: mdi:clock-alert
|
||||||
school_day_end_reminder:
|
kallen_school_day_end_reminder:
|
||||||
name: School Day End Reminder
|
name: School Day End Reminder
|
||||||
has_date: false
|
has_date: false
|
||||||
has_time: true
|
has_time: true
|
||||||
@ -245,7 +245,7 @@ automation:
|
|||||||
initial_state: true
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: input_datetime.school_day_end
|
at: input_datetime.kallen_school_day_end
|
||||||
id: day_end
|
id: day_end
|
||||||
- platform: time
|
- platform: time
|
||||||
at: 00:00
|
at: 00:00
|
||||||
@ -321,9 +321,9 @@ automation:
|
|||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.kallen_two_hour_delay
|
- input_boolean.kallen_two_hour_delay
|
||||||
- input_boolean.school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.school_early_release
|
- input_boolean.kallen_school_early_release
|
||||||
- input_boolean.school_today_extended
|
- input_boolean.kallen_school_today_extended
|
||||||
- input_boolean.kallen_at_school
|
- input_boolean.kallen_at_school
|
||||||
- input_boolean.kallen_band_practice
|
- input_boolean.kallen_band_practice
|
||||||
- delay:
|
- delay:
|
||||||
@ -356,29 +356,29 @@ script:
|
|||||||
state: "on"
|
state: "on"
|
||||||
then:
|
then:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.school_early_release
|
entity_id: input_boolean.kallen_school_early_release
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
target:
|
target:
|
||||||
entity_id: input_datetime.school_day_end
|
entity_id: input_datetime.kallen_school_day_end
|
||||||
data:
|
data:
|
||||||
time: "14:30:00"
|
time: "14:30:00"
|
||||||
else:
|
else:
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
target:
|
target:
|
||||||
entity_id: input_datetime.school_day_end
|
entity_id: input_datetime.kallen_school_day_end
|
||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','end_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
{{ as_timestamp(strptime(state_attr('calendar.kallen_school_days','end_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%H:%M") }}
|
||||||
- service: input_datetime.set_datetime
|
- service: input_datetime.set_datetime
|
||||||
target:
|
target:
|
||||||
entity_id: input_datetime.school_day_start
|
entity_id: input_datetime.kallen_school_day_start
|
||||||
data:
|
data:
|
||||||
time: >
|
time: >
|
||||||
{{ 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") }}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.school_today_extended
|
- input_boolean.kallen_school_today_extended
|
||||||
- service: script.turn_on
|
- service: script.turn_on
|
||||||
entity_id: script.school_in_session
|
entity_id: script.school_in_session
|
||||||
- delay:
|
- delay:
|
||||||
@ -386,7 +386,7 @@ script:
|
|||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{{ state_attr('input_datetime.school_day_start','timestamp') == 28800 }}
|
{{ state_attr('input_datetime.kallen_school_day_start','timestamp') == 28800 }}
|
||||||
then:
|
then:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.kallen_band_practice
|
entity_id: input_boolean.kallen_band_practice
|
||||||
@ -396,7 +396,7 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.kallen_two_hour_delay
|
- input_boolean.kallen_two_hour_delay
|
||||||
- input_boolean.kallen_school_cancelled
|
- input_boolean.kallen_school_cancelled
|
||||||
|
|
||||||
@ -405,9 +405,9 @@ script:
|
|||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.school_today_extended
|
- input_boolean.kallen_school_today_extended
|
||||||
- input_boolean.kallen_band_practice
|
- input_boolean.kallen_band_practice
|
||||||
- input_boolean.school_early_release
|
- input_boolean.kallen_school_early_release
|
||||||
|
|
||||||
school_in_session:
|
school_in_session:
|
||||||
alias: 'School In Session'
|
alias: 'School In Session'
|
||||||
|
@ -135,7 +135,7 @@ automation:
|
|||||||
entity_id: input_boolean.work_today
|
entity_id: input_boolean.work_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.kallen_school_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
action:
|
action:
|
||||||
- service: script.security_disarm
|
- service: script.security_disarm
|
||||||
@ -164,7 +164,7 @@ automation:
|
|||||||
entity_id: input_boolean.work_today
|
entity_id: input_boolean.work_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.kallen_school_today
|
||||||
state: 'on'
|
state: 'on'
|
||||||
action:
|
action:
|
||||||
- if:
|
- if:
|
||||||
@ -186,7 +186,7 @@ automation:
|
|||||||
- thu
|
- thu
|
||||||
- fri
|
- fri
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: input_boolean.school_early_release
|
entity_id: input_boolean.kallen_school_early_release
|
||||||
state: "on"
|
state: "on"
|
||||||
then:
|
then:
|
||||||
- stop: School early release
|
- stop: School early release
|
||||||
|
12
scripts.yaml
12
scripts.yaml
@ -506,23 +506,23 @@ freeze_cleanup:
|
|||||||
entity_id: calendar.kallen_school_days
|
entity_id: calendar.kallen_school_days
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: time
|
- condition: time
|
||||||
before: input_datetime.school_day_end
|
before: input_datetime.kallen_school_day_end
|
||||||
after: input_datetime.school_day_start
|
after: input_datetime.kallen_school_day_start
|
||||||
then:
|
then:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.school_today_extended
|
- input_boolean.kallen_school_today_extended
|
||||||
- input_boolean.kallen_at_school
|
- input_boolean.kallen_at_school
|
||||||
else:
|
else:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
data: {}
|
data: {}
|
||||||
target:
|
target:
|
||||||
entity_id:
|
entity_id:
|
||||||
- input_boolean.school_today
|
- input_boolean.kallen_school_today
|
||||||
- input_boolean.school_today_extended
|
- input_boolean.kallen_school_today_extended
|
||||||
- input_boolean.kallen_at_school
|
- input_boolean.kallen_at_school
|
||||||
- if:
|
- if:
|
||||||
- condition: time
|
- condition: time
|
||||||
|
@ -291,7 +291,7 @@
|
|||||||
"Tony will be streaming today. The studio is scheduled to go online at {{ (state_attr('input_datetime.tony_streaming_start_time','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
"Tony will be streaming today. The studio is scheduled to go online at {{ (state_attr('input_datetime.tony_streaming_start_time','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_state('input_boolean.school_today', 'on') %}
|
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
||||||
{% if is_state('sensor.school_start_days2go', '0') %}
|
{% if is_state('sensor.school_start_days2go', '0') %}
|
||||||
Today is the first day of school! There are {{ states('sensor.school_end_days2go') }} to go until the last day.
|
Today is the first day of school! There are {{ states('sensor.school_end_days2go') }} to go until the last day.
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -303,7 +303,7 @@
|
|||||||
'But there was a two hour delay. '
|
'But there was a two hour delay. '
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<s>Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
<s>Pickup today will be at {{(state_attr('input_datetime.kallen_school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
||||||
{% if 'Early Release' in states('sensor.school_event') %}
|
{% if 'Early Release' in states('sensor.school_event') %}
|
||||||
And It is early release!
|
And It is early release!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% if is_state('input_boolean.school_today', 'on') %}
|
{% if is_state('input_boolean.kallen_school_today', 'on') %}
|
||||||
{% if is_state('sensor.school_start_days2go', '0') %}
|
{% if is_state('sensor.school_start_days2go', '0') %}
|
||||||
Today is the first day of school!
|
Today is the first day of school!
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -41,8 +41,8 @@
|
|||||||
{% if is_state('input_boolean.kallen_band_practice','on') %}
|
{% if is_state('input_boolean.kallen_band_practice','on') %}
|
||||||
'You have band practice this morning before school. '
|
'You have band practice this morning before school. '
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<s>School today starts at {{ (state_attr('input_datetime.school_day_start','timestamp') | int | timestamp_custom('%I:%M %p' , False)) }}</s>
|
<s>School today starts at {{ (state_attr('input_datetime.kallen_school_day_start','timestamp') | int | timestamp_custom('%I:%M %p' , False)) }}</s>
|
||||||
<s>Pickup today will be at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
<s>Pickup today will be at {{(state_attr('input_datetime.kallen_school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
||||||
{% if 'Early Release' in states('sensor.school_event') %}
|
{% if 'Early Release' in states('sensor.school_event') %}
|
||||||
And It is early dismissal today!
|
And It is early dismissal today!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -51,7 +51,7 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
The lunch menu for today is {{ states('sensor.lunch_menu_items') }}
|
The lunch menu for today is {{ states('sensor.lunch_menu_items') }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.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.kallen_school_cancelled','on') %}
|
||||||
"School is cancelled for today. "
|
"School is cancelled for today. "
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -91,7 +91,7 @@
|
|||||||
There are only {{ states.sensor.spring_break_days2go.state }} days until Spring Break!
|
There are only {{ states.sensor.spring_break_days2go.state }} days until Spring Break!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_state ('input_boolean.school_today', 'off') and is_state('sensor.pirateweather_icon', 'snow') %}
|
{% if is_state ('input_boolean.kallen_school_today', 'off') and is_state('sensor.pirateweather_icon', 'snow') %}
|
||||||
Do you wanna build a snowman? It is snowing!
|
Do you wanna build a snowman? It is snowing!
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<p>
|
<p>
|
||||||
"Hello Collin, "
|
"Hello Collin, "
|
||||||
|
|
||||||
{% if is_state('input_boolean.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.kallen_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 %}
|
||||||
@ -16,15 +16,15 @@
|
|||||||
"You do not have school today. Enjoy your day off! "
|
"You do not have school today. Enjoy your day off! "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{% if is_state('input_boolean.kallen_band_practice','on') %}
|
{% if is_state('input_boolean.kallen_band_practice','on') %}
|
||||||
"You have band practice this morning before school. "
|
"You have band practice this morning before school. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"Your school day will start at {{ (state_attr('input_datetime.school_day_start','timestamp') | int | timestamp_custom('%I:%M %p' , False)) }}. "
|
"Your school day will start at {{ (state_attr('input_datetime.kallen_school_day_start','timestamp') | int | timestamp_custom('%I:%M %p' , False)) }}. "
|
||||||
{% if is_state('input_boolean.school_early_release','on') %}
|
{% if is_state('input_boolean.kallen_school_early_release','on') %}
|
||||||
"There will be early dismissal today. "
|
"There will be early dismissal today. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"Your school day will end at {{(state_attr('input_datetime.school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
"Your school day will end at {{(state_attr('input_datetime.kallen_school_day_end', 'timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
@ -107,8 +107,8 @@
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
|
||||||
{% if is_state('input_boolean.school_today','on') and is_state('input_boolean.work_today','on') %}
|
{% if is_state('input_boolean.kallen_school_today','on') and is_state('input_boolean.work_today','on') %}
|
||||||
{% set diff = (state_attr('input_datetime.tina_workday_start','timestamp') - state_attr('input_datetime.school_day_start','timestamp')) %}
|
{% set diff = (state_attr('input_datetime.tina_workday_start','timestamp') - state_attr('input_datetime.kallen_school_day_start','timestamp')) %}
|
||||||
{%- if states.sensor.home_to_school.state|round > 12 %}
|
{%- if states.sensor.home_to_school.state|round > 12 %}
|
||||||
Traffic to the school appears heavier than normal.
|
Traffic to the school appears heavier than normal.
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -130,7 +130,7 @@
|
|||||||
Traffic to Bob Evans is normal.
|
Traffic to Bob Evans is normal.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
Currently it will take {{states.sensor.home_to_bob_evans.state|round}} minutes to get to Bob Evans.
|
Currently it will take {{states.sensor.home_to_bob_evans.state|round}} minutes to get to Bob Evans.
|
||||||
{% elif is_state('input_boolean.school_today','on') %}
|
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
||||||
{%- if states.sensor.home_to_school.state|round > 12 %}
|
{%- if states.sensor.home_to_school.state|round > 12 %}
|
||||||
Traffic to the school appears heavier than normal.
|
Traffic to the school appears heavier than normal.
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -22,10 +22,10 @@
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% set endbefore = state_attr('input_datetime.school_day_end','timestamp') - 3600 %}
|
{% set endbefore = state_attr('input_datetime.kallen_school_day_end','timestamp') - 3600 %}
|
||||||
{% set endafter = state_attr('input_datetime.school_day_end','timestamp') + 3600 %}
|
{% set endafter = state_attr('input_datetime.kallen_school_day_end','timestamp') + 3600 %}
|
||||||
{% set current = ((now().hour * 60 + now().minute) * 60 ) %}
|
{% set current = ((now().hour * 60 + now().minute) * 60 ) %}
|
||||||
{% if is_state('input_boolean.school_today_extended','on') and current > endbefore and current < endafter %}
|
{% if is_state('input_boolean.kallen_school_today_extended','on') and current > endbefore and current < endafter %}
|
||||||
"Welcome home Collin as well, "
|
"Welcome home Collin as well, "
|
||||||
{{ [
|
{{ [
|
||||||
'I hope you had a great day at school! ',
|
'I hope you had a great day at school! ',
|
||||||
@ -151,8 +151,8 @@
|
|||||||
"Tina has work today. "
|
"Tina has work today. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if is_state('input_boolean.kallen_at_school','on') %}
|
{% if is_state('input_boolean.kallen_at_school','on') %}
|
||||||
"Kallen is at school right now. His pickup time will be at {{ (state_attr('input_datetime.school_day_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
"Kallen is at school right now. His pickup time will be at {{ (state_attr('input_datetime.kallen_school_day_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
|
||||||
{% elif is_state('input_boolean.school_today','on') %}
|
{% elif is_state('input_boolean.kallen_school_today','on') %}
|
||||||
"Kallen has school today. "
|
"Kallen has school today. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
Reference in New Issue
Block a user