Improve situations where wife worked today but is done now
This commit is contained in:
@ -345,8 +345,11 @@ Tony does not have a stream scheduled today. The next scheduled stream is in {{
|
||||
Tina is at work right now. She will be done at approximately {{ input_datetime_12hr('input_datetime.tina_workday_end') }} today.
|
||||
{% elif is_state('input_boolean.work_today','on') %}
|
||||
Tina has work at {{ input_datetime_12hr('input_datetime.tina_workday_start') }} today.
|
||||
{% elif is_state('binary_sensor.evening','on') and is_state('binary_sensor.tina_work_tomorrow','on') %}
|
||||
Tina has work tomorrow at {{ diff | timestamp_custom('%H:%M %p',false) }}.
|
||||
{% elif is_state('input_boolean.work_today_extended','on') and is_state('input_boolean.work_today','off') %}
|
||||
Tina has finished work for the day.
|
||||
{% if is_state('binary_sensor.tina_work_tomorrow','on') %}
|
||||
She has work tomorrow at {{ diff | timestamp_custom('%H:%M %p',false) }}.
|
||||
{% endif %}
|
||||
{% else %}
|
||||
Tina has today off from work.
|
||||
{% endif %}
|
||||
|
@ -4,6 +4,9 @@ input_boolean:
|
||||
work_today:
|
||||
name: Work Today
|
||||
icon: mdi:briefcase
|
||||
work_today_extended:
|
||||
name: Work Today Extended
|
||||
icon: mdi:briefcase-plus
|
||||
|
||||
input_datetime:
|
||||
tina_workday_start:
|
||||
@ -29,6 +32,9 @@ automation:
|
||||
entity_id: input_boolean.tina_work_schedule_override
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.work_today_extended
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: >
|
||||
@ -69,7 +75,9 @@ script:
|
||||
{{ set_time_from_calendar('calendar.family_tinawork','end_time') }}
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.work_today
|
||||
entity_id:
|
||||
- input_boolean.work_today
|
||||
- input_boolean.work_today_extended
|
||||
|
||||
tina_work_reset:
|
||||
alias: 'Tina Work Reset'
|
||||
@ -91,6 +99,9 @@ script:
|
||||
- service: script.tina_work_today
|
||||
else:
|
||||
- service: script.tina_work_reset
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.work_today_extended
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: time
|
||||
|
Reference in New Issue
Block a user