Combined morning and evening schedule automations
This commit is contained in:
@ -38,106 +38,116 @@ input_datetime:
|
|||||||
|
|
||||||
automation:
|
automation:
|
||||||
- id: c772b54d-6448-4d74-a0c2-32998f49b17c
|
- id: c772b54d-6448-4d74-a0c2-32998f49b17c
|
||||||
alias: Kallen Scheduling - Morning
|
alias: Kallen Scheduling
|
||||||
trigger:
|
trigger:
|
||||||
platform: time
|
- platform: time
|
||||||
at: '06:05:00'
|
at: '06:05:00'
|
||||||
|
id: kallen-morning
|
||||||
|
- platform: time
|
||||||
|
at: '16:00:00'
|
||||||
|
id: kallen-evening
|
||||||
action:
|
action:
|
||||||
- service: input_datetime.set_datetime
|
- if:
|
||||||
entity_id: input_datetime.kallen_wakeup_time
|
- condition: trigger
|
||||||
data_template:
|
id: kallen-morning
|
||||||
time: >
|
then:
|
||||||
{% if is_state('input_boolean.school_today', 'on') %}
|
- service: input_datetime.set_datetime
|
||||||
07:30
|
entity_id: input_datetime.kallen_wakeup_time
|
||||||
{% else %}
|
data_template:
|
||||||
10:00
|
time: >
|
||||||
{% endif %}
|
{% if is_state('input_boolean.school_today', 'on') %}
|
||||||
- service: input_datetime.set_datetime
|
07:30
|
||||||
entity_id: input_datetime.kallen_morning_briefing
|
{% else %}
|
||||||
data_template:
|
10:00
|
||||||
time: >
|
{% endif %}
|
||||||
{% if is_state('input_boolean.school_today', 'on') %}
|
- service: input_datetime.set_datetime
|
||||||
07:40
|
entity_id: input_datetime.kallen_morning_briefing
|
||||||
{% else %}
|
data_template:
|
||||||
10:00
|
time: >
|
||||||
{% endif %}
|
{% if is_state('input_boolean.school_today', 'on') %}
|
||||||
|
07:40
|
||||||
- id: 0335656c-b5cf-4983-bbac-a2d71ca2b74e
|
{% else %}
|
||||||
alias: Kallen Scheduling - Evening
|
10:00
|
||||||
trigger:
|
{% endif %}
|
||||||
platform: time
|
- if:
|
||||||
at: '16:00:00'
|
- condition: trigger
|
||||||
action:
|
id: kallen-evening
|
||||||
- service: input_datetime.set_datetime
|
then:
|
||||||
entity_id: input_datetime.kallen_bedtime
|
- service: input_datetime.set_datetime
|
||||||
data_template:
|
entity_id: input_datetime.kallen_bedtime
|
||||||
time: >
|
data_template:
|
||||||
{% if is_state('sensor.school_tomorrow', 'on') %}
|
time: >
|
||||||
21:00
|
{% if is_state('sensor.school_tomorrow', 'on') %}
|
||||||
{% else %}
|
21:00
|
||||||
22:00
|
{% else %}
|
||||||
{% endif %}
|
22:00
|
||||||
- service: input_datetime.set_datetime
|
{% endif %}
|
||||||
entity_id: input_datetime.kallen_nightly_briefing
|
- service: input_datetime.set_datetime
|
||||||
data_template:
|
entity_id: input_datetime.kallen_nightly_briefing
|
||||||
time: >
|
data_template:
|
||||||
{% if is_state('sensor.school_tomorrow', 'on') %}
|
time: >
|
||||||
20:40
|
{% if is_state('sensor.school_tomorrow', 'on') %}
|
||||||
{% else %}
|
20:40
|
||||||
21:40
|
{% else %}
|
||||||
{% endif %}
|
21:40
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
- id: 1c9f7e4b-2d5a-4b95-bd80-d9aa2244a6db
|
- id: 1c9f7e4b-2d5a-4b95-bd80-d9aa2244a6db
|
||||||
alias: House Scheduling - Morning
|
alias: House Scheduling
|
||||||
trigger:
|
trigger:
|
||||||
platform: time
|
- platform: time
|
||||||
at: '06:10:00'
|
at: '06:10:00'
|
||||||
|
id: house-morning
|
||||||
|
- platform: time
|
||||||
|
at: '16:05:00'
|
||||||
|
id: house-evening
|
||||||
action:
|
action:
|
||||||
- service: input_datetime.set_datetime
|
- if:
|
||||||
entity_id: input_datetime.audible_notification_on
|
- condition: trigger
|
||||||
data_template:
|
id: house-morning
|
||||||
time: >
|
then:
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
- service: input_datetime.set_datetime
|
||||||
07:30
|
entity_id: input_datetime.audible_notification_on
|
||||||
{% else %}
|
data_template:
|
||||||
09:00
|
time: >
|
||||||
{% endif %}
|
{% if is_state('input_boolean.school_today','on') %}
|
||||||
- service: input_datetime.set_datetime
|
07:30
|
||||||
entity_id: input_datetime.morning_report
|
{% else %}
|
||||||
data_template:
|
08:15
|
||||||
time: >
|
{% endif %}
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
- service: input_datetime.set_datetime
|
||||||
08:20
|
entity_id: input_datetime.morning_report
|
||||||
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
data_template:
|
||||||
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
time: >
|
||||||
{% else %}
|
{% if is_state('input_boolean.school_today','on') %}
|
||||||
12:00
|
08:20
|
||||||
{% endif %}
|
{% elif is_state('input_boolean.work_today','on') and is_state('input_boolean.school_today','off') %}
|
||||||
- service: input_datetime.set_datetime
|
{{ (state_attr('input_datetime.tina_workday_start', 'timestamp') - 1800) | timestamp_custom('%H:%M', false) }}
|
||||||
entity_id: input_datetime.daily_report
|
{% else %}
|
||||||
data_template:
|
12:00
|
||||||
time: >
|
{% endif %}
|
||||||
{% if is_state('input_boolean.school_today','on') %}
|
- service: input_datetime.set_datetime
|
||||||
14:15
|
entity_id: input_datetime.daily_report
|
||||||
{% else %}
|
data_template:
|
||||||
{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
time: >
|
||||||
{% endif %}
|
{% if is_state('input_boolean.school_today','on') %}
|
||||||
|
14:15
|
||||||
- id: 55293e9a-ec3b-46bb-af47-94e95f3c9951
|
{% else %}
|
||||||
alias: House Scheduling - Evening
|
{{ (state_attr('input_datetime.tina_workday_end', 'timestamp') + 3600) | timestamp_custom('%H:%M', false) }}
|
||||||
trigger:
|
{% endif %}
|
||||||
platform: time
|
- if:
|
||||||
at: '16:05:00'
|
- condition: trigger
|
||||||
action:
|
id: house-evening
|
||||||
- service: input_datetime.set_datetime
|
then:
|
||||||
entity_id: input_datetime.audible_notification_off
|
- service: input_datetime.set_datetime
|
||||||
data_template:
|
entity_id: input_datetime.audible_notification_off
|
||||||
time: >
|
data_template:
|
||||||
{% if is_state('sensor.school_tomorrow','on') %}
|
time: >
|
||||||
22:00
|
{% if is_state('sensor.school_tomorrow','on') %}
|
||||||
{% else %}
|
22:00
|
||||||
23:00
|
{% else %}
|
||||||
{% endif %}
|
23:00
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
- id: 89470712-f94d-4c01-8215-ed15b3bc799a
|
- id: 89470712-f94d-4c01-8215-ed15b3bc799a
|
||||||
alias: Master Bedroom Scheduling
|
alias: Master Bedroom Scheduling
|
||||||
@ -192,4 +202,4 @@ automation:
|
|||||||
22:00
|
22:00
|
||||||
{% else %}
|
{% else %}
|
||||||
00:00
|
00:00
|
||||||
{% endif %}
|
{% endif %}
|
Reference in New Issue
Block a user