Added logic for wife's work status

This commit is contained in:
2022-05-22 17:52:45 -04:00
parent 01a9f7d8f3
commit 7e7b965bf3
3 changed files with 57 additions and 1 deletions

View File

@ -18,6 +18,20 @@
{% else %}
off
{% endif %}
work_tomorrow:
friendly_name: 'Work Tomorrow'
value_template: >-
{%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %}
{% if states.calendar.family_tinawork.attributes.start_time == test + " 09:00:00" %}
on
{% elif states.calendar.family_tinawork.attributes.start_time == test + " 07:00:00" %}
on
{% elif states.calendar.family_tinawork.attributes.start_time == test + " 10:00:00" %}
on
{% else %}
off
{% endif %}
- platform: time_date
display_options:
- 'time'