Update fireplace automation time and add new kids' routines and announcements
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
description: Turn the fireplace mantle outlet off overnight.
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: '00:00:00'
|
||||
at: '22:00:00'
|
||||
id: 'off'
|
||||
- trigger: time
|
||||
at: '06:00:00'
|
||||
|
||||
@@ -1,6 +1,137 @@
|
||||
# Kids routines, school prep, and announcement automations.
|
||||
|
||||
- id: '1788133654306'
|
||||
alias: Declan - Non-school day afternoon medication reminder
|
||||
description: Remind Declan to take his medicine at 2 PM on non-school days.
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: '14:00:00'
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- sat
|
||||
- sun
|
||||
- condition: state
|
||||
entity_id: calendar.holidays_in_united_states
|
||||
state: 'on'
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ states('calendar.family_events') == 'on'
|
||||
and 'no school' in (state_attr('calendar.family_events', 'message')
|
||||
| default('') | lower) }}
|
||||
actions:
|
||||
- action: notify.alexa_media
|
||||
data:
|
||||
target:
|
||||
- media_player.living_room
|
||||
- media_player.declan_s_room
|
||||
message: Declan, this is your reminder to take your afternoon medicine.
|
||||
- action: notify.notify_events_alerts
|
||||
data:
|
||||
title: Declan medication reminder
|
||||
message: Declan's afternoon medicine reminder.
|
||||
mode: single
|
||||
|
||||
- id: '1788133654303'
|
||||
alias: Set weekday announcement speakers to volume 8
|
||||
description: Set the school-announcement speakers to volume level 8 each weekday.
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: '07:10:00'
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- tue
|
||||
- wed
|
||||
- thu
|
||||
- fri
|
||||
actions:
|
||||
- action: media_player.volume_set
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.living_room
|
||||
- media_player.jordyn_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.dinning_room
|
||||
- media_player.declan_s_room
|
||||
data:
|
||||
volume_level: 0.8
|
||||
mode: single
|
||||
|
||||
- id: '1788133651043'
|
||||
alias: Set Jordyns announcement speaker to volume 10
|
||||
description: Set the school-announcement speakers to volume level 8 each weekday.
|
||||
triggers:
|
||||
- trigger: time
|
||||
at: '07:15:00'
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
actions:
|
||||
- action: media_player.volume_set
|
||||
target:
|
||||
entity_id:
|
||||
- media_player.jordyn_s_room
|
||||
data:
|
||||
volume_level: 1.0
|
||||
mode: single
|
||||
|
||||
- id: '1743380000904'
|
||||
alias: Jordyn OT Wake Up Call 1
|
||||
description: ''
|
||||
triggers:
|
||||
- at: '07:40:00'
|
||||
trigger: time
|
||||
enabled: true
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
actions:
|
||||
- data:
|
||||
message: Jordyn, time to wake up and get out of bed for OT! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this!
|
||||
action: notify.alexa_media_jordyn_s_room
|
||||
mode: single
|
||||
|
||||
- id: '1743380036904'
|
||||
alias: Jordyn OT Wake Up Call 2
|
||||
description: ''
|
||||
triggers:
|
||||
- at: '07:43:00'
|
||||
trigger: time
|
||||
enabled: true
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
actions:
|
||||
- data:
|
||||
message: Jordyn, you need to wake up and get out of bed for OT! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this!
|
||||
action: notify.alexa_media_jordyn_s_room
|
||||
mode: single
|
||||
|
||||
- id: '1743382700904'
|
||||
alias: Jordyn OT Wake Up Call 3
|
||||
description: ''
|
||||
triggers:
|
||||
- at: '07:46:00'
|
||||
trigger: time
|
||||
enabled: true
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
actions:
|
||||
- data:
|
||||
message: Jordyn, get out of bed! Move! Move! Move! Move! Get dressed, put on deodorant, brush your teeth, and brush your hair. You got this!
|
||||
action: notify.alexa_media_jordyn_s_room
|
||||
mode: single
|
||||
|
||||
- id: '1788133654304'
|
||||
alias: Jordyn-Bedtime-Snack-Notification-Weekend
|
||||
description: Triggers an Alexa notification at 8:00 PM if the Google Calendar event
|
||||
is 'Girls at Home'
|
||||
@@ -377,7 +508,6 @@
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
- wed
|
||||
- condition: and
|
||||
conditions:
|
||||
@@ -393,35 +523,51 @@
|
||||
data: {}
|
||||
- data:
|
||||
target:
|
||||
- media_player.family_room
|
||||
- media_player.living_room
|
||||
- media_player.jordyn_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.dinning_room
|
||||
message: Jordyn this is your reminder to pack your snack and fill your water bottle. Please make sure your
|
||||
message: Jordyn this is your reminder to take your medicine if you haven't, pack your snack and fill your water bottle. Please make sure your
|
||||
hair is brushed nicely.
|
||||
action: notify.alexa_media
|
||||
mode: single
|
||||
|
||||
- id: '1756211855375'
|
||||
alias: Jordyn - Time for School Announcement
|
||||
- id: '1788133654305'
|
||||
alias: Jordyn - School and OT Prep Announcement
|
||||
description: ''
|
||||
triggers:
|
||||
- at: 08:40:00
|
||||
- at: 07:50:00
|
||||
trigger: time
|
||||
conditions:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
- wed
|
||||
- condition: and
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- mon
|
||||
- condition: template
|
||||
value_template: '{{ now().strftime(''%U'') | int % 2 == 1 }}'
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
actions:
|
||||
- target:
|
||||
entity_id: media_player.hisense_g204x_cd41
|
||||
action: media_player.media_pause
|
||||
data: {}
|
||||
- data:
|
||||
target:
|
||||
- media_player.living_room
|
||||
- media_player.jordyn_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.dinning_room
|
||||
message: Jordyn, you have OT today. This is your reminder to take your medicine if you haven't, pack your snack and fill your water bottle. Please make sure your
|
||||
hair is brushed nicely.
|
||||
action: notify.alexa_media
|
||||
mode: single
|
||||
|
||||
- id: '1756211851043'
|
||||
alias: Jordyn - Time for OT & School Announcement
|
||||
description: ''
|
||||
triggers:
|
||||
- at: 08:13:00
|
||||
trigger: time
|
||||
conditions:
|
||||
- condition: time
|
||||
weekday:
|
||||
- tue
|
||||
actions:
|
||||
- target:
|
||||
entity_id: media_player.hisense_g204x_cd41
|
||||
@@ -429,11 +575,11 @@
|
||||
data: {}
|
||||
- data:
|
||||
target:
|
||||
- media_player.family_room
|
||||
- media_player.living_room
|
||||
- media_player.jordyn_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.dinning_room
|
||||
message: Time for school! Last call to get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!!
|
||||
message: Time to head out for OT and school! Last call to quickly get your water bottle, snack, and put on your shoes. Good luck, have fun, don't die!!
|
||||
action: notify.alexa_media
|
||||
mode: single
|
||||
|
||||
@@ -458,12 +604,11 @@
|
||||
data: {}
|
||||
- data:
|
||||
target:
|
||||
- media_player.family_room
|
||||
- media_player.living_room
|
||||
- media_player.declan_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.dinning_room
|
||||
message: Declan this is your reminder to pack your snack and fill your water bottle. Please make sure your
|
||||
hair is brushed nicely.
|
||||
message: Declan this is your reminder to pack your snack and fill your water bottle.
|
||||
action: notify.alexa_media
|
||||
mode: single
|
||||
|
||||
@@ -488,7 +633,7 @@
|
||||
data: {}
|
||||
- data:
|
||||
target:
|
||||
- media_player.family_room
|
||||
- media_player.living_room
|
||||
- media_player.declan_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.dinning_room
|
||||
|
||||
@@ -1,111 +1,111 @@
|
||||
- id: '1772978762478'
|
||||
alias: Kiosk Rotate Dashboards
|
||||
description: During 8:30 AM-4:00 PM, show summer schedule only on weekdays with
|
||||
no camp event today; otherwise rotate normally.
|
||||
triggers:
|
||||
- minutes: /1
|
||||
trigger: time_pattern
|
||||
actions:
|
||||
- action: calendar.get_events
|
||||
target:
|
||||
entity_id: calendar.family_events
|
||||
data:
|
||||
start_date_time: '{{ today_at(''00:00'') }}'
|
||||
end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}'
|
||||
response_variable: agenda
|
||||
- variables:
|
||||
camp_events: '{{ (agenda[''calendar.family_events''][''events''] | default([]))
|
||||
| selectattr(''summary'', ''defined'') | map(attribute=''summary'') | map(''lower'')
|
||||
| select(''search'', ''camp'') | list | count }}'
|
||||
should_show_summer: '{{ now().weekday() < 5 and today_at(''08:29:59'') <= now()
|
||||
< today_at(''16:00'') and (camp_events | int(0)) == 0 }}'
|
||||
current_view: '{{ states(''input_select.kiosk_view'') }}'
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: '{{ should_show_summer | bool }}'
|
||||
sequence:
|
||||
- action: input_select.select_option
|
||||
target:
|
||||
entity_id: input_select.kiosk_view
|
||||
data:
|
||||
option: summer-schedule-kiosk
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: '{{ current_view == ''summer-schedule-kiosk'' and not (should_show_summer
|
||||
| bool) }}'
|
||||
sequence:
|
||||
- action: input_select.select_next
|
||||
target:
|
||||
entity_id: input_select.kiosk_view
|
||||
data:
|
||||
cycle: true
|
||||
default:
|
||||
- action: input_select.select_next
|
||||
target:
|
||||
entity_id: input_select.kiosk_view
|
||||
data:
|
||||
cycle: true
|
||||
mode: single
|
||||
- id: '1772978826069'
|
||||
alias: Kiosk Navigate Display
|
||||
description: ''
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: input_select.kiosk_view
|
||||
actions:
|
||||
- data:
|
||||
browser_id:
|
||||
- raspberry-kiosk
|
||||
path: /{{ states('input_select.kiosk_view') }}
|
||||
action: browser_mod.navigate
|
||||
mode: restart
|
||||
- id: '1774407470375'
|
||||
alias: ESPHome Fleet Update
|
||||
description: ''
|
||||
triggers:
|
||||
- at: 03:00:00
|
||||
trigger: time
|
||||
- event_type: esphome_fleet_update_trigger
|
||||
trigger: event
|
||||
conditions:
|
||||
- condition: template
|
||||
value_template: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\
|
||||
\ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | list | count\
|
||||
\ > 0 }}\n"
|
||||
actions:
|
||||
- variables:
|
||||
pending_devices: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\
|
||||
\ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='entity_id')\
|
||||
\ | list }}\n"
|
||||
pending_names: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\
|
||||
\ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='name')\
|
||||
\ | join(', ') }}\n"
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: ESPHome Fleet Update Starting
|
||||
message: 'Updating {{ pending_devices | count }} device(s): {{ pending_names
|
||||
}}
|
||||
# - id: '1772978762478'
|
||||
# alias: Kiosk Rotate Dashboards
|
||||
# description: During 8:30 AM-4:00 PM, show summer schedule only on weekdays with
|
||||
# no camp event today; otherwise rotate normally.
|
||||
# triggers:
|
||||
# - minutes: /1
|
||||
# trigger: time_pattern
|
||||
# actions:
|
||||
# - action: calendar.get_events
|
||||
# target:
|
||||
# entity_id: calendar.family_events
|
||||
# data:
|
||||
# start_date_time: '{{ today_at(''00:00'') }}'
|
||||
# end_date_time: '{{ today_at(''00:00'') + timedelta(days=1) }}'
|
||||
# response_variable: agenda
|
||||
# - variables:
|
||||
# camp_events: '{{ (agenda[''calendar.family_events''][''events''] | default([]))
|
||||
# | selectattr(''summary'', ''defined'') | map(attribute=''summary'') | map(''lower'')
|
||||
# | select(''search'', ''camp'') | list | count }}'
|
||||
# should_show_summer: '{{ now().weekday() < 5 and today_at(''08:29:59'') <= now()
|
||||
# < today_at(''16:00'') and (camp_events | int(0)) == 0 }}'
|
||||
# current_view: '{{ states(''input_select.kiosk_view'') }}'
|
||||
# - choose:
|
||||
# - conditions:
|
||||
# - condition: template
|
||||
# value_template: '{{ should_show_summer | bool }}'
|
||||
# sequence:
|
||||
# - action: input_select.select_option
|
||||
# target:
|
||||
# entity_id: input_select.kiosk_view
|
||||
# data:
|
||||
# option: summer-schedule-kiosk
|
||||
# - conditions:
|
||||
# - condition: template
|
||||
# value_template: '{{ current_view == ''summer-schedule-kiosk'' and not (should_show_summer
|
||||
# | bool) }}'
|
||||
# sequence:
|
||||
# - action: input_select.select_next
|
||||
# target:
|
||||
# entity_id: input_select.kiosk_view
|
||||
# data:
|
||||
# cycle: true
|
||||
# default:
|
||||
# - action: input_select.select_next
|
||||
# target:
|
||||
# entity_id: input_select.kiosk_view
|
||||
# data:
|
||||
# cycle: true
|
||||
# mode: single
|
||||
# - id: '1772978826069'
|
||||
# alias: Kiosk Navigate Display
|
||||
# description: ''
|
||||
# triggers:
|
||||
# - trigger: state
|
||||
# entity_id: input_select.kiosk_view
|
||||
# actions:
|
||||
# - data:
|
||||
# browser_id:
|
||||
# - raspberry-kiosk
|
||||
# path: /{{ states('input_select.kiosk_view') }}
|
||||
# action: browser_mod.navigate
|
||||
# mode: restart
|
||||
# - id: '1774407470375'
|
||||
# alias: ESPHome Fleet Update
|
||||
# description: ''
|
||||
# triggers:
|
||||
# - at: 03:00:00
|
||||
# trigger: time
|
||||
# - event_type: esphome_fleet_update_trigger
|
||||
# trigger: event
|
||||
# conditions:
|
||||
# - condition: template
|
||||
# value_template: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\
|
||||
# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | list | count\
|
||||
# \ > 0 }}\n"
|
||||
# actions:
|
||||
# - variables:
|
||||
# pending_devices: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\
|
||||
# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='entity_id')\
|
||||
# \ | list }}\n"
|
||||
# pending_names: "{{ expand(integration_entities('esphome'))\n | selectattr('entity_id',\
|
||||
# \ 'contains', 'update')\n | selectattr('state', 'eq', 'on')\n | map(attribute='name')\
|
||||
# \ | join(', ') }}\n"
|
||||
# - action: notify.persistent_notification
|
||||
# data:
|
||||
# title: ESPHome Fleet Update Starting
|
||||
# message: 'Updating {{ pending_devices | count }} device(s): {{ pending_names
|
||||
# }}
|
||||
|
||||
'
|
||||
- repeat:
|
||||
for_each: '{{ pending_devices }}'
|
||||
sequence:
|
||||
- action: update.install
|
||||
target:
|
||||
entity_id: '{{ repeat.item }}'
|
||||
continue_on_error: true
|
||||
- wait_template: '{{ not is_state(repeat.item, ''on'') }}
|
||||
# '
|
||||
# - repeat:
|
||||
# for_each: '{{ pending_devices }}'
|
||||
# sequence:
|
||||
# - action: update.install
|
||||
# target:
|
||||
# entity_id: '{{ repeat.item }}'
|
||||
# continue_on_error: true
|
||||
# - wait_template: '{{ not is_state(repeat.item, ''on'') }}
|
||||
|
||||
'
|
||||
timeout: 00:05:00
|
||||
continue_on_timeout: true
|
||||
- delay:
|
||||
minutes: 2
|
||||
- action: notify.persistent_notification
|
||||
data:
|
||||
title: ESPHome Fleet Update Complete
|
||||
message: 'Finished updating {{ pending_devices | count }} device(s): {{ pending_names
|
||||
}}
|
||||
# '
|
||||
# timeout: 00:05:00
|
||||
# continue_on_timeout: true
|
||||
# - delay:
|
||||
# minutes: 2
|
||||
# - action: notify.persistent_notification
|
||||
# data:
|
||||
# title: ESPHome Fleet Update Complete
|
||||
# message: 'Finished updating {{ pending_devices | count }} device(s): {{ pending_names
|
||||
# }}
|
||||
|
||||
'
|
||||
# '
|
||||
|
||||
Reference in New Issue
Block a user