Add day camp automation scripts and configuration
This commit is contained in:
@@ -1261,3 +1261,54 @@
|
||||
data:
|
||||
type: announce
|
||||
method: all
|
||||
- id: '1744503044812'
|
||||
alias: Check day camp daily
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '04:00:00'
|
||||
action:
|
||||
- service: script.check_day_camp
|
||||
- id: '1744503044813'
|
||||
alias: Announce day camp preparation and pause TV
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:30:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.day_camp_today
|
||||
state: 'on'
|
||||
action:
|
||||
- service: notify.alexa_media
|
||||
data:
|
||||
target:
|
||||
- media_player.living_room
|
||||
- media_player.declan_s_room
|
||||
- media_player.jordyn_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.tv_alexa
|
||||
message: "Time to prepare for day camp. Please do the following: Fill water bottles, Put on deodorant, Brush hair for Jordyn, Brush teeth."
|
||||
- service: media_player.media_pause
|
||||
target:
|
||||
entity_id: media_player.kids_tv
|
||||
- id: '1744503044814'
|
||||
alias: Announce time to leave for day camp and turn off TV
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '08:45:00'
|
||||
condition:
|
||||
- condition: state
|
||||
entity_id: input_boolean.day_camp_today
|
||||
state: 'on'
|
||||
action:
|
||||
- service: notify.alexa_media
|
||||
data:
|
||||
target:
|
||||
- media_player.living_room
|
||||
- media_player.declan_s_room
|
||||
- media_player.jordyn_s_room
|
||||
- media_player.kitchen
|
||||
- media_player.tv_alexa
|
||||
message: "It is time to leave for day camp. Please do the following: Put on shoes, Get lunch, Get water bottle, Get bag if needed."
|
||||
- service: media_player.turn_off
|
||||
target:
|
||||
entity_id: media_player.kids_tv
|
||||
@@ -2,6 +2,11 @@
|
||||
# Loads default set of integrations. Do not remove.
|
||||
default_config:
|
||||
|
||||
# Load custom components
|
||||
input_boolean: !include custom_variables.yaml
|
||||
script: !include scripts.yaml
|
||||
automation: !include automations.yaml
|
||||
|
||||
# Load frontend themes from the themes folder
|
||||
frontend:
|
||||
themes: !include_dir_merge_named themes
|
||||
@@ -17,6 +22,7 @@ http:
|
||||
- 192.168.1.1
|
||||
- 192.168.1.62
|
||||
- 192.168.1.210
|
||||
|
||||
### SMTP
|
||||
notify:
|
||||
- name: "mailgun_smtp"
|
||||
|
||||
5
custom_variables.yaml
Normal file
5
custom_variables.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
# For day camp automation
|
||||
input_boolean:
|
||||
day_camp_today:
|
||||
name: Day Camp Today
|
||||
initial: off
|
||||
22
scripts.yaml
22
scripts.yaml
@@ -0,0 +1,22 @@
|
||||
- check_day_camp:
|
||||
sequence:
|
||||
- service: calendar.list_events
|
||||
data:
|
||||
start_date: "{{ now().date() }}"
|
||||
end_date: "{{ (now() + timedelta(days=1)).date() }}"
|
||||
target:
|
||||
entity_id: calendar.family_events
|
||||
response_variable: events
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: >
|
||||
{{ events.events | selectattr('summary', 'search', 'Camp') | rejectattr('summary', 'search', 'No') | list | count > 0 }}
|
||||
sequence:
|
||||
- service: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.day_camp_today
|
||||
default:
|
||||
- service: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.day_camp_today
|
||||
Reference in New Issue
Block a user