Migrate announcement automations #154
This commit is contained in:
194
automations.yaml
194
automations.yaml
@ -2457,3 +2457,197 @@
|
||||
- input_boolean.tina_night_meds_taken
|
||||
data: {}
|
||||
mode: restart
|
||||
- id: '1696361494561'
|
||||
alias: Turn On Audible Notifications
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.audible_notification_on
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.audible_notifications
|
||||
data: {}
|
||||
alias: Turn on audible notifications
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- switch.living_room_echo_dot_do_not_disturb_switch
|
||||
data: {}
|
||||
alias: Turn off DND mode on Living Room Echo Dot
|
||||
- service: script.volume_reset
|
||||
data: {}
|
||||
alias: Reset volumes
|
||||
mode: single
|
||||
initial_state: true
|
||||
- id: '1696361569078'
|
||||
alias: Turn Off Audible Notifications
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.audible_notification_off
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.audible_notifications
|
||||
data: {}
|
||||
alias: Turn off audible notifications
|
||||
mode: single
|
||||
initial_state: true
|
||||
- id: '1696361739711'
|
||||
alias: Kallen Briefings
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.kallen_morning_briefing
|
||||
id: kallen-morning
|
||||
alias: Morning Briefing Time
|
||||
- platform: time
|
||||
at: input_datetime.kallen_nightly_briefing
|
||||
id: kallen-nightly
|
||||
alias: Nightly Briefing Time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_overnight
|
||||
state: 'off'
|
||||
alias: Kallen is not staying overnight elsewhere
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
alias: We are not on vacation
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: kallen-morning
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_morning_briefing
|
||||
state: 'off'
|
||||
alias: Morning Briefing
|
||||
sequence:
|
||||
- service: script.kallen_morning_briefing
|
||||
data: {}
|
||||
alias: Run morning briefing script
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: kallen-nightly
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_nightly_briefing
|
||||
state: 'off'
|
||||
alias: Nightly Briefing
|
||||
sequence:
|
||||
- service: script.kallen_nightly_briefing
|
||||
data: {}
|
||||
alias: Run nightly briefing script
|
||||
alias: Choose briefing
|
||||
mode: single
|
||||
- id: '1696362054868'
|
||||
alias: House Briefings
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.morning_briefing
|
||||
id: house-morning
|
||||
alias: Morning Briefing Time
|
||||
- platform: time
|
||||
at: input_datetime.daily_briefing
|
||||
id: house-daily
|
||||
alias: Daily Briefing Time
|
||||
- platform: time
|
||||
at: input_datetime.nightly_briefing
|
||||
id: house-nightly
|
||||
alias: Nightly Briefing Time
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
alias: We are not on vacation
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: house-morning
|
||||
- condition: state
|
||||
entity_id: input_boolean.good_morning
|
||||
state: 'off'
|
||||
alias: Morning Briefing
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: "{% if is_state('input_boolean.kallen_school_today','on')
|
||||
and is_state('input_boolean.kallen_overnight','on') %}\n false\n{% else
|
||||
%}\n true\n{% endif %}\n"
|
||||
alias: If Kallen was not elsewhere overnight on a school morning
|
||||
then:
|
||||
- service: script.morning_briefing
|
||||
data: {}
|
||||
alias: Run morning briefing script
|
||||
alias: Skip if Kallen has school but stayed overnight elsewhere
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: house-daily
|
||||
- condition: state
|
||||
entity_id: input_boolean.daily_briefing
|
||||
state: 'off'
|
||||
alias: Daily Briefing
|
||||
sequence:
|
||||
- service: script.daily_briefing
|
||||
data: {}
|
||||
alias: Run daily briefing script
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: house-nightly
|
||||
- condition: state
|
||||
entity_id: input_boolean.nightly_briefing
|
||||
state: 'off'
|
||||
alias: Nightly Briefing
|
||||
sequence:
|
||||
- service: script.nightly_briefing
|
||||
data: {}
|
||||
alias: Run nightly briefing script
|
||||
alias: Choose briefing
|
||||
mode: single
|
||||
- id: '1696362140540'
|
||||
alias: Kallen Briefing Location Change
|
||||
description: ''
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kallen_awake
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
alias: When Kallen wakes up
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_school_today
|
||||
state: 'on'
|
||||
alias: Kallen has school today
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_overnight
|
||||
state: 'off'
|
||||
alias: Kallen did not stay overnight elsewhere
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Common Areas
|
||||
target:
|
||||
entity_id: input_select.kallen_morning_briefing_location
|
||||
alias: Move morning briefing to common areas
|
||||
mode: single
|
||||
|
@ -105,160 +105,6 @@ intent_script:
|
||||
# Announcment Automation - fires at the time of the above input_datetimes
|
||||
################################
|
||||
|
||||
automation:
|
||||
|
||||
- id: 81bee5ee-6820-4626-aebf-3deb8de69e4d
|
||||
alias: Turn On Audible Notifications
|
||||
initial_state: true
|
||||
trigger:
|
||||
platform: time
|
||||
at: input_datetime.audible_notification_on
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_on
|
||||
entity_id: input_boolean.audible_notifications
|
||||
- service: switch.turn_off
|
||||
target:
|
||||
entity_id:
|
||||
- switch.living_room_echo_dot_do_not_disturb_switch
|
||||
- service: script.volume_reset
|
||||
|
||||
# Turn off audible notifications if they have't been turned off yet.
|
||||
- id: e0e9c774-6abe-42aa-bdab-32108bebb0e9
|
||||
alias: Turn Off Audible Notifications
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.audible_notification_off
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_boolean.turn_off
|
||||
entity_id: input_boolean.audible_notifications
|
||||
|
||||
- id: 842a1b9a-de3b-4f0a-9ecc-6cfacd92bf5d
|
||||
alias: Kallen Briefings
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.kallen_morning_briefing
|
||||
id: kallen-morning
|
||||
- platform: time
|
||||
at: input_datetime.kallen_nightly_briefing
|
||||
id: kallen-nightly
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_overnight
|
||||
state: 'off'
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: kallen-morning
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_morning_briefing
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: script.kallen_morning_briefing
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: kallen-nightly
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_nightly_briefing
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: script.kallen_nightly_briefing
|
||||
|
||||
- id: fa2b59f8-1ad6-4380-9347-cb7d53590e41
|
||||
alias: House Briefings
|
||||
trigger:
|
||||
- platform: time
|
||||
at: input_datetime.morning_briefing
|
||||
id: house-morning
|
||||
- platform: time
|
||||
at: input_datetime.daily_briefing
|
||||
id: house-daily
|
||||
- platform: time
|
||||
at: input_datetime.nightly_briefing
|
||||
id: house-nightly
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.vacation_mode
|
||||
state: 'off'
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: house-morning
|
||||
- condition: state
|
||||
entity_id: input_boolean.good_morning
|
||||
state: 'off'
|
||||
sequence:
|
||||
- if:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{% if is_state('input_boolean.kallen_school_today','on') and is_state('input_boolean.kallen_overnight','on') %}
|
||||
false
|
||||
{% else %}
|
||||
true
|
||||
{% endif %}
|
||||
then:
|
||||
- service: script.morning_briefing
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: house-daily
|
||||
- condition: state
|
||||
entity_id: input_boolean.daily_briefing
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: script.daily_briefing
|
||||
- conditions:
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: trigger
|
||||
id: house-nightly
|
||||
- condition: state
|
||||
entity_id: input_boolean.nightly_briefing
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: script.nightly_briefing
|
||||
|
||||
- id: d7641b5e-3cbb-4fb3-b6ed-5edf3157b88d
|
||||
alias: Kallen Briefing Location Change
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.kallen_awake
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_school_today
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.kallen_overnight
|
||||
state: 'off'
|
||||
action:
|
||||
- service: input_select.select_option
|
||||
data:
|
||||
option: Common Areas
|
||||
target:
|
||||
entity_id: input_select.kallen_morning_briefing_location
|
||||
|
||||
script:
|
||||
reset_annc_switches:
|
||||
sequence:
|
||||
|
Reference in New Issue
Block a user