Latest attempt to fix wife's "work tomorrow" in TTS briefings
This commit is contained in:
Submodule node-red/projects/NerdFlows updated: e0340744f1...8ac212299a
@ -18,10 +18,13 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
"Collin does not have school tomorrow. "
|
"Collin does not have school tomorrow. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% set start = (state_attr('binary_sensor.tina_work_tomorrow','start_timestamp') | int) // 1000 %}
|
||||||
|
{% set tmrw = (as_timestamp(states('sensor.date')) + 86400) | int %}
|
||||||
|
{% set diff = (start - tmrw) %}
|
||||||
{% if is_state('input_boolean.work_today','on') %}
|
{% if is_state('input_boolean.work_today','on') %}
|
||||||
"Tina is still 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)) }}. "
|
"Tina is still 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('binary_sensor.tina_work_tomorrow','on') %}
|
{% elif is_state('binary_sensor.tina_work_tomorrow','on') %}
|
||||||
"Tina has work tomorrow. Check your calendar for the start time. "
|
"Tina has work tomorrow at {{ diff | timestamp_custom('%H:%M %p',false) }}. "
|
||||||
{% else %}
|
{% else %}
|
||||||
"Tina appears to have tomorrow off. "
|
"Tina appears to have tomorrow off. "
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
Reference in New Issue
Block a user