2019-02-21 17:49:55 +00:00
|
|
|
###############################################################################
|
|
|
|
# @author : Jeffrey Stone
|
|
|
|
# @date : 02/19/2019
|
|
|
|
# @package : Notify
|
|
|
|
# @description : A Collection of Notification Scripts and Configs.
|
|
|
|
# Package modified from https://github.com/skalavala/smarthome/blob/master/packages/notify.yaml
|
|
|
|
###############################################################################
|
|
|
|
#homeassistant:
|
2019-02-23 04:32:32 +00:00
|
|
|
|
2019-02-21 17:49:55 +00:00
|
|
|
#ifttt:
|
|
|
|
# key: !secret IFTTT_API_KEY
|
|
|
|
|
|
|
|
tts:
|
2019-07-11 11:43:09 +00:00
|
|
|
- platform: google_translate
|
2019-02-21 17:49:55 +00:00
|
|
|
cache: true
|
|
|
|
cache_dir: /tmp/tts
|
|
|
|
time_memory: 300
|
|
|
|
|
|
|
|
notify:
|
|
|
|
- platform: ios
|
|
|
|
- name: all_ios
|
|
|
|
platform: group
|
|
|
|
services:
|
|
|
|
- service: ios_jeffreystonesiphone
|
|
|
|
- service: ios_jeffreystonesipad
|
|
|
|
- service: ios_katherinestonesiphone
|
|
|
|
- name: jeff_ios
|
|
|
|
platform: group
|
|
|
|
services:
|
|
|
|
- service: ios_jeffreystonesiphone
|
|
|
|
- service: ios_jeffreystonesipad
|
2019-07-11 11:43:09 +00:00
|
|
|
- name: kat_ios
|
|
|
|
platform: group
|
|
|
|
services:
|
|
|
|
- service: ios_katherinestonesiphone
|
2019-02-21 17:49:55 +00:00
|
|
|
- name: 'Master Bedroom Echo'
|
|
|
|
platform: command_line
|
|
|
|
command: "/home/homeassistant/bin/alexa_wrapper -d 'Master Bedroom'"
|
|
|
|
- name: 'Living Room Echo'
|
|
|
|
platform: command_line
|
|
|
|
command: "/home/homeassistant/bin/alexa_wrapper -d 'Living Room'"
|
|
|
|
- name: 'Kitchen Echo'
|
|
|
|
platform: command_line
|
|
|
|
command: "/home/homeassistant/bin/alexa_wrapper -d 'Kitchen'"
|
|
|
|
- name: 'All Echo'
|
|
|
|
platform: command_line
|
|
|
|
command: "/home/homeassistant/bin/alexa_wrapper -d 'All'"
|
|
|
|
- name: twitter
|
|
|
|
platform: twitter
|
|
|
|
consumer_key: !secret twitter_consumer_key
|
|
|
|
consumer_secret: !secret twitter_consumer_secret
|
|
|
|
access_token: !secret twitter_access_token
|
|
|
|
access_token_secret: !secret twitter_access_secret
|
|
|
|
|
|
|
|
script:
|
|
|
|
|
2019-02-23 04:32:32 +00:00
|
|
|
|
2019-02-21 17:49:55 +00:00
|
|
|
###############################################################################
|
|
|
|
# Txt Notify
|
|
|
|
###############################################################################
|
|
|
|
text_notify_all:
|
|
|
|
sequence:
|
|
|
|
- service: notify.all_ios
|
|
|
|
data_template:
|
|
|
|
message: >
|
|
|
|
{{ message }}
|
|
|
|
|
|
|
|
text_notify_jeff:
|
|
|
|
sequence:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.text_notify_jeff
|
|
|
|
state: 'on'
|
|
|
|
- service: notify.jeff_ios
|
|
|
|
data_template:
|
|
|
|
message: >
|
|
|
|
{{ message }}
|
|
|
|
|
|
|
|
text_notify_kat:
|
|
|
|
sequence:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.text_notify_kat
|
|
|
|
state: 'on'
|
|
|
|
- service: notify.kat_ios
|
|
|
|
data_template:
|
|
|
|
message: >
|
|
|
|
{{ message }}
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Alert Notify
|
|
|
|
# Conditions:
|
|
|
|
# => Vacation mode should be off
|
|
|
|
# Services:
|
|
|
|
# => Audible
|
|
|
|
# => iOS
|
|
|
|
###############################################################################
|
|
|
|
alert_notify:
|
|
|
|
sequence:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.vacation_mode
|
|
|
|
state: 'off'
|
2019-07-11 11:43:09 +00:00
|
|
|
- service: tts.google_translate_say
|
2019-02-21 17:49:55 +00:00
|
|
|
data_template:
|
|
|
|
entity_id: media_player.hass_speaker
|
|
|
|
message: >
|
|
|
|
{{ message }}
|
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Voice Notify
|
|
|
|
# Conditions:
|
|
|
|
# => Only Announce when people are home.
|
|
|
|
# => Only Announce when Audible Notifications are on
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
voice_notify:
|
|
|
|
sequence:
|
|
|
|
- condition: template
|
|
|
|
value_template: '{{ states.input_boolean.audible_notifications.state == "on" }}'
|
|
|
|
- condition: state
|
|
|
|
entity_id: sensor.family_status
|
|
|
|
state: 'Home'
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.vacation_mode
|
|
|
|
state: 'off'
|
2019-03-09 02:52:37 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: media_player.hass_speaker
|
|
|
|
state: 'idle'
|
2019-07-11 11:43:09 +00:00
|
|
|
- service: tts.google_translate_say
|
2019-02-21 17:49:55 +00:00
|
|
|
data_template:
|
|
|
|
entity_id: media_player.hass_speaker
|
|
|
|
message: >
|
2019-07-11 11:43:09 +00:00
|
|
|
{{message }}
|
2019-02-21 17:49:55 +00:00
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Twitter
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
twitter_notify:
|
|
|
|
sequence:
|
2019-02-23 04:32:32 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.tweet_system
|
|
|
|
state: 'on'
|
2019-02-21 17:49:55 +00:00
|
|
|
- service: notify.twitter
|
|
|
|
data_template:
|
|
|
|
message: >
|
|
|
|
{% set msg = "" %}
|
|
|
|
{% set msg = msg + " " + message %}
|
2019-02-23 04:32:32 +00:00
|
|
|
{% set msg = msg + " #iot #smarthome" %}
|
2019-02-21 17:49:55 +00:00
|
|
|
{{ msg }}
|
|
|
|
|
|
|
|
twitter_snark:
|
|
|
|
sequence:
|
2019-02-23 04:32:32 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.tweet_snark
|
|
|
|
state: 'on'
|
2019-02-21 17:49:55 +00:00
|
|
|
- service: notify.twitter
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/twitter_snark.yaml
|
|
|
|
|
|
|
|
twitter_github:
|
|
|
|
sequence:
|
2019-02-23 04:32:32 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.tweet_system
|
|
|
|
state: 'on'
|
2019-02-21 17:49:55 +00:00
|
|
|
- service: notify.twitter
|
|
|
|
data_template:
|
|
|
|
message: >
|
|
|
|
{% set msg = "" %}
|
|
|
|
{% set msg = msg + " " + message %}
|
|
|
|
{% set msg = msg + " #smarthome #iot " %}
|
|
|
|
{{ msg }}
|
|
|
|
|
|
|
|
twitter_new_ha:
|
|
|
|
sequence:
|
2019-02-23 04:32:32 +00:00
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.tweet_releases
|
|
|
|
state: 'on'
|
2019-02-21 17:49:55 +00:00
|
|
|
- service: notify.twitter
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/twitter_new_ha.yaml
|
2019-02-23 04:32:32 +00:00
|
|
|
|
2019-02-21 17:49:55 +00:00
|
|
|
###############################################################################
|
|
|
|
# Morning Report
|
|
|
|
###############################################################################
|
|
|
|
morning_report:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/morning_report.yaml
|
|
|
|
|
2019-02-23 04:32:32 +00:00
|
|
|
|
2019-02-21 17:49:55 +00:00
|
|
|
###############################################################################
|
|
|
|
# Skylar Get Dressed
|
|
|
|
###############################################################################
|
|
|
|
skylar_morning_greeting:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/skylar_morning.yaml
|
2019-02-23 04:32:32 +00:00
|
|
|
|
2019-02-21 17:49:55 +00:00
|
|
|
###############################################################################
|
|
|
|
# Nightly Report
|
|
|
|
###############################################################################
|
|
|
|
nightly_report:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/nightly_report.yaml
|
|
|
|
|
2019-07-11 11:43:09 +00:00
|
|
|
###############################################################################
|
|
|
|
# Weather Report
|
|
|
|
###############################################################################
|
|
|
|
weather_report:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/weather_report.yaml
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Traffic Report
|
|
|
|
###############################################################################
|
|
|
|
traffic_report:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/traffic_report.yaml
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Jeff ETA Report
|
|
|
|
###############################################################################
|
|
|
|
jeff_eta_report:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/jeff_eta.yaml
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# Kat ETA Report
|
|
|
|
###############################################################################
|
|
|
|
kat_eta_report:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: !include ../templates/kat_eta.yaml
|
|
|
|
|
2019-02-21 17:49:55 +00:00
|
|
|
###############################################################################
|
|
|
|
# Prebed Routing
|
|
|
|
###############################################################################
|
|
|
|
prebed_routine:
|
|
|
|
sequence:
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
2019-07-11 11:43:09 +00:00
|
|
|
message: !include ../templates/skylar_night.yaml
|
|
|
|
# message: >
|
|
|
|
# Bed time is in 30 mins. If you are taking a bath now is the time to get in the tub, otherwise time to put on pajamas and brush teeth.
|