Add UUID to all remaining sensors, remove bad units_of_measure #70
This commit is contained in:
@ -75,16 +75,19 @@ sensor:
|
||||
- platform: template
|
||||
sensors:
|
||||
school_start_days2go:
|
||||
unique_id: 94a53e67-c00f-4cc7-9309-f9033a9482f9
|
||||
value_template: "{{ ((state_attr('input_datetime.school_first_day', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.school_first_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
school_end_days2go:
|
||||
unique_id: 589c44ec-7e16-4c72-a264-cdf54de409a9
|
||||
value_template: "{{ ((state_attr('input_datetime.school_last_day', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.school_last_day','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
vacation_days2go:
|
||||
unique_id: f1628d87-e58a-4d1a-8a49-a71f0a9ed3e5
|
||||
value_template: >
|
||||
{% if state_attr('calendar.vacation', 'start_time') %}
|
||||
{{ ((as_timestamp(strptime(state_attr('calendar.vacation', 'start_time'), '%Y-%m-%d'))-as_timestamp(now())) | int /60/1440) | round(0) }}
|
||||
@ -93,16 +96,19 @@ sensor:
|
||||
{% endif %}
|
||||
unit_of_measurement: 'Days'
|
||||
thanksgiving_break_days2go:
|
||||
unique_id: 2381e9de-407b-4304-b09a-448c169bbaf2
|
||||
value_template: "{{ ((state_attr('input_datetime.thanksgiving_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.thanksgiving_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
christmas_break_days2go:
|
||||
unique_id: 851700f7-c593-4db8-ba4f-001cbffcfc4a
|
||||
value_template: "{{ ((state_attr('input_datetime.christmas_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.christmas_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
unit_of_measurement: 'Days'
|
||||
spring_break_days2go:
|
||||
unique_id: cec6e687-8999-4548-991c-02ba546335f5
|
||||
value_template: "{{ ((state_attr('input_datetime.spring_break_start', 'timestamp')-as_timestamp(now())) | int /60/1440) | round(0) }}"
|
||||
attribute_templates:
|
||||
date: "{{ state_attr('input_datetime.spring_break_start','timestamp') | timestamp_custom('%B %d, %Y') }}"
|
||||
@ -131,6 +137,7 @@ sensor:
|
||||
{% endif %}
|
||||
kallen_lunch_menu_week:
|
||||
friendly_name: Lunch Menu Week
|
||||
unique_id: 62ba9dcb-3cd3-4875-8e6f-86bebf542c37
|
||||
value_template: >
|
||||
{% if is_state('calendar.elementary_school_lunch','on') %}
|
||||
{{ state_attr('calendar.elementary_school_lunch','message') }}
|
||||
@ -151,6 +158,7 @@ sensor:
|
||||
{% endif %}
|
||||
kallen_lunch_menu_items:
|
||||
friendly_name: Lunch Menu Items
|
||||
unique_id: a2cb62d7-ae9f-4bab-81c1-81f2006391b2
|
||||
icon_template: >
|
||||
{% set week = states('sensor.kallen_lunch_menu_week') %}
|
||||
{% if week == 'First Menu' %}
|
||||
|
Reference in New Issue
Block a user