Improved alarm system scheduling
This commit is contained in:
@ -144,10 +144,24 @@ automation:
|
||||
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif is_state('input_boolean.school_today','on') %}
|
||||
08:00
|
||||
{{ (state_attr('input_datetime.school_day_start','timestamp') - 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% else %}
|
||||
11:00
|
||||
{% endif %}
|
||||
- service: input_datetime.set_datetime
|
||||
entity_id: input_datetime.morning_alarm_rearm
|
||||
data_template:
|
||||
time: >
|
||||
{% if is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 1800) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif is_state('input_boolean.school_today','on') and is_state('input_boolean.work_today','off') %}
|
||||
{{ (state_attr('input_datetime.school_day_start','timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','on') %}
|
||||
{{ (state_attr('input_datetime.tina_workday_start','timestamp') + 1800) | timestamp_custom('%H:%M', false) }}
|
||||
{% else %}
|
||||
12:00
|
||||
{% endif %}
|
||||
|
||||
- if:
|
||||
- condition: trigger
|
||||
id: house-evening
|
||||
|
Reference in New Issue
Block a user