Fixed work_tomorrow sensor

This commit is contained in:
2022-10-13 19:32:00 -04:00
parent 02fb100217
commit 70cefc3d75

View File

@ -30,11 +30,7 @@
friendly_name: 'Work Tomorrow' friendly_name: 'Work Tomorrow'
value_template: >- value_template: >-
{%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %} {%- set test=(as_timestamp(now())+ (86400)) | timestamp_custom("%Y-%m-%d",true) %}
{% if states.calendar.family_tinawork.attributes.start_time == test + " 09:00:00" %} {% if states.calendar.family_tinawork.attributes.start_time >= test + " 05: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 on
{% else %} {% else %}
off off