2019-02-21 17:49:55 +00:00
###############################################################################
# @author : Jeffrey Stone
# @date : 02/19/2019
# @package : Announcements
2019-07-18 02:05:05 +00:00
# @description : Daily Announcements.
2019-02-21 17:49:55 +00:00
###############################################################################
2019-07-18 02:05:05 +00:00
###############################
# input_datetime - So the time report automation fires can be set in the UI
###############################
input_datetime :
morning_report :
name : Morning Report
has_date : false
has_time : true
nightly_report :
name : Nightly Report
has_date : false
has_time : true
skylar_morning_report :
name : Skylar Dressed Announcement
has_date : false
has_time : true
skylar_nightly_report :
name : Skylar Bedtime Announcement
has_date : false
has_time : true
################################
# Announcment Automation - fires at the time of the above input_datetimes
################################
2019-02-21 17:49:55 +00:00
automation :
- id : prebed_routine
2019-07-11 11:40:26 +00:00
initial_state : true
alias : Skylar Nightly Announcements
2019-02-21 17:49:55 +00:00
trigger :
2019-07-11 11:40:26 +00:00
platform : template
value_template : "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
2019-02-21 17:49:55 +00:00
action :
2019-07-14 21:02:31 +00:00
- service : script.ah_report
data :
call_interuption : 1
call_prebed_routine : 1
2019-02-21 17:49:55 +00:00
- id : nightly_report
2019-07-11 11:40:26 +00:00
initial_state : true
2019-02-21 17:49:55 +00:00
alias : Nightly Report
trigger :
2019-07-11 11:40:26 +00:00
platform : template
value_template : "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
2019-02-21 17:49:55 +00:00
action :
2019-07-14 21:02:31 +00:00
- service : script.ah_report
data :
call_greeting : 1
call_evening_greeting : 1
call_weather_alerts : 1
call_overnight_forecast : 1
2019-11-10 00:17:42 +00:00
call_freeze_warning : 1
2019-11-22 02:35:17 +00:00
call_future_forecast : 1
2019-07-14 21:02:31 +00:00
call_upcoming_holidays : 1
2020-01-03 17:28:38 +00:00
call_upcoming_events : 1
2019-07-16 01:40:39 +00:00
call_reminders : 1
2019-07-14 21:02:31 +00:00
call_chores : 1
2019-11-22 02:35:17 +00:00
call_full_moon : 1
2019-07-14 01:38:53 +00:00
2019-02-21 17:49:55 +00:00
- id : good_morning_report
alias : Good Morning Report
initial_state : true
trigger :
2019-07-11 11:40:26 +00:00
platform : template
value_template : "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
2019-02-21 17:49:55 +00:00
action :
2019-07-14 21:02:31 +00:00
- service : script.ah_report
data :
call_greeting : 1
call_morning_greeting : 1
2019-07-16 02:22:35 +00:00
call_time_annc : 1
2019-07-14 21:02:31 +00:00
call_weather_alerts : 1
call_todays_events : 1
2020-04-02 23:17:22 +00:00
call_current_conditions_outside : 1
2019-07-14 21:02:31 +00:00
call_current_conditions_inside : 1
call_daily_forecast : 1
call_upcoming_birthdays : 1
2020-01-03 17:28:38 +00:00
call_upcoming_events : 1
2019-07-16 01:40:39 +00:00
call_reminders : 1
call_chores : 1
2019-02-21 17:49:55 +00:00
- service : script.twitter_notify
data :
2020-03-18 02:51:23 +00:00
message : >-
{{ [ "I just provided a morning briefing including weather, and traffic
conditions, and other things that ensure the residents of Anchorage House know what to expect today.",
"Time for the daily update. It was like that scene in Ironman where JARVIS gives the daily briefing but no one was listening. " ,
"I have prepared a safety briefing to present to my residents but they would just ignore it." ,
"Each day at this time I provide the residents of this house an update that includes everything they need to know about the upcoming day. But with more snark."
] | random }}
2019-07-14 21:02:31 +00:00
2019-02-21 17:49:55 +00:00
- id : skylar_morning_greeting
alias : Skylar Morning Greeting
initial_state : true
trigger :
2019-07-11 11:40:26 +00:00
platform : template
value_template : "{{ states('sensor.time') == (state_attr('input_datetime.skylar_morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
2019-02-21 17:49:55 +00:00
condition :
- condition : time
weekday :
- mon
- tue
- wed
- thu
- fri
action :
2019-07-14 21:02:31 +00:00
- service : script.ah_report
data :
call_interuption : 1
2019-07-16 02:22:35 +00:00
call_time_annc : 1
2019-07-14 21:02:31 +00:00
call_skylar_dressed : 1
call_school_today : 1
call_skylar_events : 1
call_clothes_suggestion : 1
2019-07-14 01:38:53 +00:00
2020-03-18 02:51:23 +00:00
- id : skylar_morning_alarm_announcement
alias : skylar morning alarm announcement
trigger :
- platform : time
at : '06:00:00'
condition :
condition : template
value_template : '{{ states.calendar.skylar_school.attributes.offset_reached == True }}'
action :
- service : notify.alexa_media_skylar_s_bedroom
data :
message : Good Morning Skylar. Time to Rise and Shine.
data :
type : tts
- delay :
seconds : 30
- service : notify.alexa_media_skylar_s_bedroom
data :
message : Good Morning Skylar. You have school today. Time to get up.
data :
type : tts
2019-09-07 19:11:00 +00:00
- id : set_skylar_morning_report_time
alias : set skylar morning report time
trigger :
- platform : time
at : '05:50:00'
action :
- service : input_datetime.set_datetime
entity_id : input_datetime.skylar_morning_report
data_template :
time : >
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
06 : 30
{% else %}
07 : 58
{% endif %}
2019-02-21 17:49:55 +00:00
2019-09-07 19:11:00 +00:00
- id : set_morning_report_time
alias : set morning report time
trigger :
- platform : time
at : '05:50:30'
action :
- service : input_datetime.set_datetime
entity_id : input_datetime.morning_report
data_template :
time : >
{% if states.calendar.skylar_school.attributes.offset_reached == True %}
07 : 00
{% else %}
07 : 45
{% endif %}
2019-11-10 00:17:42 +00:00