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.
|
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') %}
|
{% elif is_state('input_boolean.work_today','on') %}
|
||||||
Tina has work at {{ input_datetime_12hr('input_datetime.tina_workday_start') }} today.
|
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') %}
|
{% elif is_state('input_boolean.work_today_extended','on') and is_state('input_boolean.work_today','off') %}
|
||||||
Tina has work tomorrow at {{ diff | timestamp_custom('%H:%M %p',false) }}.
|
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 %}
|
{% else %}
|
||||||
Tina has today off from work.
|
Tina has today off from work.
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -4,6 +4,9 @@ input_boolean:
|
|||||||
work_today:
|
work_today:
|
||||||
name: Work Today
|
name: Work Today
|
||||||
icon: mdi:briefcase
|
icon: mdi:briefcase
|
||||||
|
work_today_extended:
|
||||||
|
name: Work Today Extended
|
||||||
|
icon: mdi:briefcase-plus
|
||||||
|
|
||||||
input_datetime:
|
input_datetime:
|
||||||
tina_workday_start:
|
tina_workday_start:
|
||||||
@ -29,6 +32,9 @@ automation:
|
|||||||
entity_id: input_boolean.tina_work_schedule_override
|
entity_id: input_boolean.tina_work_schedule_override
|
||||||
state: 'off'
|
state: 'off'
|
||||||
action:
|
action:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.work_today_extended
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
@ -69,7 +75,9 @@ script:
|
|||||||
{{ set_time_from_calendar('calendar.family_tinawork','end_time') }}
|
{{ set_time_from_calendar('calendar.family_tinawork','end_time') }}
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: input_boolean.work_today
|
entity_id:
|
||||||
|
- input_boolean.work_today
|
||||||
|
- input_boolean.work_today_extended
|
||||||
|
|
||||||
tina_work_reset:
|
tina_work_reset:
|
||||||
alias: 'Tina Work Reset'
|
alias: 'Tina Work Reset'
|
||||||
@ -91,6 +99,9 @@ script:
|
|||||||
- service: script.tina_work_today
|
- service: script.tina_work_today
|
||||||
else:
|
else:
|
||||||
- service: script.tina_work_reset
|
- service: script.tina_work_reset
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.work_today_extended
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: time
|
- condition: time
|
||||||
|
Reference in New Issue
Block a user