Adjusted Kallen morning routine and audible noti on and off

This commit is contained in:
2022-04-20 18:01:25 -04:00
parent d6cd5d5623
commit 53722d2c4c

View File

@ -42,8 +42,8 @@ automation:
alias: Turn On Audible Notifications alias: Turn On Audible Notifications
initial_state: true initial_state: true
trigger: trigger:
platform: template platform: time
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.audible_notification_on', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" at: input_datetime.audible_notification_on
action: action:
- service: input_boolean.turn_on - service: input_boolean.turn_on
entity_id: input_boolean.audible_notifications entity_id: input_boolean.audible_notifications
@ -53,8 +53,8 @@ automation:
alias: Turn Off Audible Notifications alias: Turn Off Audible Notifications
initial_state: true initial_state: true
trigger: trigger:
- platform: template - platform: time
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.audible_notification_off', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}" at: input_datetime.audible_notification_off
condition: condition:
- condition: state - condition: state
entity_id: input_boolean.audible_notifications entity_id: input_boolean.audible_notifications
@ -114,14 +114,37 @@ automation:
10:00 10:00
{% endif %} {% endif %}
- id: 1c9f7e4b-2d5a-4b95-bd80-d9aa2244a6db
alias: House Scheduling
trigger:
platform: time
at: '06:10:00'
action:
- service: input_datetime.set_datetime
entity_id: input_datetime.audible_notification_on
data_template:
time: >
{% if is_state('input_boolean.school_today','on') %}
07:30
{% else %}
09:00
{% endif %}
- service: input_datetime.set_datetime
entity_id: input_datetime.audible_notification_off
data_template:
time: >
{% if is_state('sensor.school_tomorrow','on') %}
22:00
{% else %}
23:00
{% endif %}
- id: db50d96f-8e2a-4e48-8d7c-ce5968527b82 - id: db50d96f-8e2a-4e48-8d7c-ce5968527b82
alias: Kallen Morning Briefing alias: Kallen Morning Briefing
trigger: trigger:
platform: time platform: time
at: input_datetime.kallen_morning_briefing at: input_datetime.kallen_morning_briefing
action: action:
- service: light.turn_on
entity_id: light.kallen_bedroom_light
- service: script.kallen_morning_briefing - service: script.kallen_morning_briefing
script: script:
@ -149,16 +172,26 @@ script:
kallen_morning_briefing: kallen_morning_briefing:
sequence: sequence:
- service: script.speech_engine - choose:
data: - conditions:
who: > - condition: state
{% if is_state('input_boolean.school_today', 'on') %} entity_id: input_boolean.school_today
kallen_bedroom state: 'on'
{% else %} sequence:
living_room - service: light.turn_on
{% endif %} target:
message: !include ../templates/speech/kallen_morning_briefing.yaml entity_id: light.kallen_bedroom_light
- service: script.text_notify default: []
data: - service: script.speech_engine
who: "ios_parents" data:
message: "I just gave Kallen's morning briefing" who: >
{% if is_state('input_boolean.school_today', 'on') %}
kallen_bedroom
{% else %}
living_room
{% endif %}
message: !include ../templates/speech/kallen_morning_briefing.yaml
- service: script.text_notify
data:
who: "ios_parents"
message: "I just gave Kallen's morning briefing"