Jeffrey Stone e02d084c92 Updated to V5 Version - Hassio Style
Lots of updates here.

Updated my Readme - Added Affiliate Links, added some more information, better organized devices
Updated gitignore with paths realtive to my hassio config
Combined my switches and lights into single yaml files instead of the directory structure previously
Added zigbee2mqtt.yaml to packages - contains automations and such for zigbee2mqtt

Archived my previous version in the V4-config branch.
2019-11-08 12:54:11 -05:00

145 lines
4.3 KiB
YAML
Executable File

###############################################################################
# @author : Jeffrey Stone
# @date : 02/19/2019
# @package : Announcements
# @description : Daily Announcements.
###############################################################################
###############################
# 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
################################
automation:
- id: prebed_routine
initial_state: true
alias: Skylar Nightly Announcements
trigger:
platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
action:
- service: script.ah_report
data:
call_interuption: 1
call_time_annc: 1
call_prebed_routine: 1
- id: nightly_report
initial_state: true
alias: Nightly Report
trigger:
platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.nightly_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
action:
- service: script.ah_report
data:
call_greeting: 1
call_evening_greeting: 1
call_time_annc: 1
call_weather_alerts: 1
call_overnight_forecast: 1
call_upcoming_holidays: 1
call_reminders: 1
call_chores: 1
- id: good_morning_report
alias: Good Morning Report
initial_state: true
trigger:
platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
action:
- service: script.ah_report
data:
call_greeting: 1
call_morning_greeting: 1
call_time_annc: 1
call_weather_alerts: 1
call_todays_events: 1
call_current_conditions_outisde: 1
call_current_conditions_inside: 1
call_daily_forecast: 1
call_upcoming_birthdays: 1
call_reminders: 1
call_chores: 1
- service: script.twitter_notify
data:
message: 'I just provided a morning briefing including weather, and traffic
conditions to the residents of Anchorage House. '
- id: skylar_morning_greeting
alias: Skylar Morning Greeting
initial_state: true
trigger:
platform: template
value_template: "{{ states('sensor.time') == (state_attr('input_datetime.skylar_morning_report', 'timestamp') | int | timestamp_custom('%H:%M', False)) }}"
condition:
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: script.ah_report
data:
call_interuption: 1
call_time_annc: 1
call_skylar_dressed: 1
call_school_today: 1
call_skylar_events: 1
call_clothes_suggestion: 1
- 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 %}
- 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 %}