Figured out work awareness for Tina #52

This commit is contained in:
2022-10-13 19:31:48 -04:00
parent 65961797b6
commit 02fb100217

View File

@ -18,7 +18,17 @@
{% else %}
"Kallen does not have school tomorrow. "
{% endif %}
"I am currently unable to tell you whether Tina works tomorrow. Coming soon, I hope. "
{% if is_state('input_boolean.work_today','on') and states('person.christina_stork') in ['Bob Evans','BobEvans'] %}
"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') %}
"Tina has work today at {{ (state_attr('input_datetime.tina_workday_start','timestamp') | int | timestamp_custom('%I:%M %p', False)) }}. "
{% elif is_state('input_boolean.work_today','off') and is_state('sensor.work_tomorrow','on') %}
"Tina has work tomorrow at {{ as_timestamp(strptime(state_attr('calendar.family_tinawork','start_time'), '%Y-%m-%d %H:%M:%S')) | timestamp_custom("%I:%M %p") }}. "
{% elif is_state('input_boolean.work_today','off') and is_state('sensor.work_tomorrow','off') %}
"Tina appears to have tomorrow off from work. "
{% else %}
"Tony is an idiot and appears to have broken my awareness of Tina's schedule. Boo this man. "
{% endif %}
</p>
<p>