More improvements for #53
This commit is contained in:
@ -235,7 +235,7 @@ script:
|
||||
entity_id: input_datetime.kallen_bedtime
|
||||
data_template:
|
||||
time: >
|
||||
{% if is_state('sensor.school_tomorrow', 'on') %}
|
||||
{% if is_state('sensor.kallen_school_tomorrow', 'on') %}
|
||||
21:00
|
||||
{% else %}
|
||||
22:00
|
||||
@ -244,7 +244,7 @@ script:
|
||||
entity_id: input_datetime.kallen_nightly_briefing
|
||||
data_template:
|
||||
time: >
|
||||
{% if is_state('sensor.school_tomorrow', 'on') %}
|
||||
{% if is_state('sensor.kallen_school_tomorrow', 'on') %}
|
||||
20:40
|
||||
{% else %}
|
||||
21:40
|
||||
@ -359,7 +359,7 @@ script:
|
||||
entity_id: input_datetime.audible_notification_off
|
||||
data_template:
|
||||
time: >
|
||||
{% if is_state('sensor.school_tomorrow','on') %}
|
||||
{% if is_state('sensor.kallen_school_tomorrow','on') %}
|
||||
22:00
|
||||
{% else %}
|
||||
23:00
|
||||
@ -390,9 +390,9 @@ script:
|
||||
data_template:
|
||||
time: >
|
||||
{% set low = state_attr('sensor.current_forecast','overnight_low') | float %}
|
||||
{% if is_state('input_boolean.hot_day','on') and is_state('sensor.school_tomorrow','on') %}
|
||||
{% if is_state('input_boolean.hot_day','on') and is_state('sensor.kallen_school_tomorrow','on') %}
|
||||
20:00
|
||||
{% elif is_state('input_boolean.hot_day','on') and is_state('sensor.school_tomorrow','off') %}
|
||||
{% elif is_state('input_boolean.hot_day','on') and is_state('sensor.kallen_school_tomorrow','off') %}
|
||||
21:00
|
||||
{% elif low >= 56 and low <= 60 %}
|
||||
22:30
|
||||
|
@ -94,6 +94,28 @@ sensor:
|
||||
spring_break_days2go:
|
||||
value_template: "{{ ((state_attr('input_datetime.spring_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
|
||||
unit_of_measurement: 'Days'
|
||||
kallen_school_tomorrow:
|
||||
unique_id: 0a1b81bc-2080-4006-b0f1-270af904d411
|
||||
friendly_name: 'Kallen School Tomorrow'
|
||||
value_template: >-
|
||||
{%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %}
|
||||
{% if states.calendar.kallen_school_days.attributes.start_time == test + " 09:00:00" %}
|
||||
on
|
||||
{% elif states.calendar.kallen_school_days.attributes.start_time == test + " 08:00:00" %}
|
||||
on
|
||||
{% else %}
|
||||
off
|
||||
{% endif %}
|
||||
kallen_band_tomorrow:
|
||||
unique_id: 2906baeb-98ec-4215-8043-e223f2759ed7
|
||||
friendly_name: 'Kallen Band Tomorrow'
|
||||
value_template: >-
|
||||
{%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %}
|
||||
{% if states.calendar.kallen_school_days.attributes.start_time == test + " 08:00:00" %}
|
||||
on
|
||||
{% else %}
|
||||
off
|
||||
{% endif %}
|
||||
lunch_menu_week:
|
||||
friendly_name: Lunch Menu Week
|
||||
value_template: >
|
||||
|
Reference in New Issue
Block a user