Will now greet K on arrival at home from school

This commit is contained in:
2022-08-31 17:01:03 -04:00
parent 1a22052ea2
commit 475b899b14

View File

@ -21,6 +21,14 @@
{% endif %}
</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>
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') %}