Merge branch 'welcome-home'
This commit is contained in:
@ -11,6 +11,9 @@ input_boolean:
|
|||||||
work_today:
|
work_today:
|
||||||
name: Work Today
|
name: Work Today
|
||||||
icon: mdi:briefcase
|
icon: mdi:briefcase
|
||||||
|
school_today_extended:
|
||||||
|
name: School Today Extended
|
||||||
|
icon: mdi:bus-school
|
||||||
|
|
||||||
input_datetime:
|
input_datetime:
|
||||||
school_first_day:
|
school_first_day:
|
||||||
@ -183,6 +186,8 @@ automation:
|
|||||||
time: "15:19:00"
|
time: "15:19:00"
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.school_today
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.school_today_extended
|
||||||
- service: script.turn_on
|
- service: script.turn_on
|
||||||
entity_id: script.school_in_session
|
entity_id: script.school_in_session
|
||||||
|
|
||||||
@ -221,9 +226,23 @@ automation:
|
|||||||
trigger:
|
trigger:
|
||||||
- platform: time
|
- platform: time
|
||||||
at: input_datetime.school_day_end
|
at: input_datetime.school_day_end
|
||||||
|
id: day_end
|
||||||
|
- platform: time
|
||||||
|
at: 00:00
|
||||||
|
id: midnight
|
||||||
action:
|
action:
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id: day_end
|
||||||
|
then:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
entity_id: input_boolean.school_today
|
entity_id: input_boolean.school_today
|
||||||
|
- if:
|
||||||
|
- condition: trigger
|
||||||
|
id: midnight
|
||||||
|
then:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.school_today_extended
|
||||||
|
|
||||||
- id: a6eeb075-d21b-436c-983f-39188ee9b016
|
- id: a6eeb075-d21b-436c-983f-39188ee9b016
|
||||||
alias: Work Reset
|
alias: Work Reset
|
||||||
|
@ -21,6 +21,15 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
{% set endbefore = state_attr('input_datetime.school_day_end','timestamp') - 3600 %}
|
||||||
|
{% set endafter = state_attr('input_datetime.school_day_end','timestamp') + 3600 %}
|
||||||
|
{% set current = ((now().hour * 60 + now().minute) * 60 ) %}
|
||||||
|
{% if is_state('input_boolean.school_today_extended','on') and current > endbefore and current < endafter %}
|
||||||
|
Welcome home Kallen as well, I hope you had a great day at school!
|
||||||
|
{% endif %}
|
||||||
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
As you are no doubt aware, the weather outside is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees
|
As you are no doubt aware, the weather outside is {{ state_attr('weather.iron_nerd_weather_station','temperature') | round }} degrees
|
||||||
{% if is_state('weather.iron_nerd_weather_station','rainy') %}
|
{% if is_state('weather.iron_nerd_weather_station','rainy') %}
|
||||||
@ -87,7 +96,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
{% if is_state('person.christina_stork','Bob Evans') and is_state('input_boolean.work_today','on') %}
|
{% if is_state('person.christina_stork','Bob Evans') and is_state('input_boolean.work_today','on') %}
|
||||||
<s>Tina is at work right now. She will be done at approximately {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}</s>
|
Tina is at work right now. She will be done at approximately {{ (state_attr('input_datetime.tina_workday_end','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}
|
||||||
{% elif is_state('input_boolean.work_today','on') %}
|
{% elif is_state('input_boolean.work_today','on') %}
|
||||||
Tina has work today.
|
Tina has work today.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user