2019-04-17 22:46:06 +00:00
|
|
|
###############################################################################
|
|
|
|
# @author : Mahasri Kalavala
|
|
|
|
# @date : 04/15/2017
|
|
|
|
# @package : Scripts
|
|
|
|
# @description : Nothing but Notification Stuff!
|
|
|
|
###############################################################################
|
|
|
|
homeassistant:
|
|
|
|
|
|
|
|
notify:
|
|
|
|
- name: ios_devices
|
|
|
|
platform: group
|
|
|
|
services:
|
|
|
|
- service: ios_ipad
|
|
|
|
- service: ios_suresh
|
|
|
|
- service: ios_mallika
|
|
|
|
- service: ios_srinika
|
|
|
|
- service: ios_hasika
|
2019-12-20 15:32:28 +00:00
|
|
|
|
2019-04-17 22:46:06 +00:00
|
|
|
# make sure you generate app password for your email if you have 2FA enabled!
|
|
|
|
- name: notify_smtp
|
|
|
|
platform: smtp
|
|
|
|
server: smtp.gmail.com
|
|
|
|
port: 587
|
|
|
|
timeout: 15
|
|
|
|
username: !secret smtp_username
|
|
|
|
password: !secret smtp_password
|
2019-12-20 15:32:28 +00:00
|
|
|
sender: !secret smtp_sender
|
2019-04-17 22:46:06 +00:00
|
|
|
recipient: !secret smtp_recipient
|
|
|
|
|
2019-05-14 23:32:32 +00:00
|
|
|
# - name: notify_aws_sns
|
|
|
|
# platform: aws_sns
|
|
|
|
# aws_access_key_id: !secret aws_access_key_id
|
|
|
|
# aws_secret_access_key: !secret aws_secret_access_key
|
|
|
|
# region_name: 'us-east-1'
|
2019-04-17 22:46:06 +00:00
|
|
|
|
|
|
|
- name: file_notify
|
|
|
|
platform: file
|
|
|
|
filename: debug.log
|
|
|
|
|
2020-09-08 02:02:44 +00:00
|
|
|
- name: telegram
|
|
|
|
platform: telegram
|
|
|
|
chat_id: !secret telegram_chatid
|
|
|
|
|
2019-04-17 22:46:06 +00:00
|
|
|
tts:
|
|
|
|
- platform: amazon_polly
|
|
|
|
aws_access_key_id: !secret aws_access_key_id
|
|
|
|
aws_secret_access_key: !secret aws_secret_access_key
|
2019-12-20 15:32:28 +00:00
|
|
|
region_name: "us-east-1"
|
2019-04-17 22:46:06 +00:00
|
|
|
text_type: ssml
|
|
|
|
voice: Joanna
|
|
|
|
|
2020-09-08 02:02:44 +00:00
|
|
|
#
|
|
|
|
# Telegram Configuration
|
|
|
|
#
|
2020-03-15 23:42:44 +00:00
|
|
|
telegram_bot:
|
|
|
|
- platform: broadcast
|
|
|
|
api_key: !secret telegram_apikey
|
|
|
|
allowed_chat_ids:
|
|
|
|
- !secret telegram_chatid
|
2020-09-08 02:02:44 +00:00
|
|
|
|
|
|
|
- platform: polling
|
|
|
|
api_key: !secret telegram_apikey
|
2021-08-31 02:07:33 +00:00
|
|
|
parse_mode: html
|
2020-09-08 02:02:44 +00:00
|
|
|
allowed_chat_ids:
|
|
|
|
- !secret telegram_chatid
|
2022-12-03 16:28:12 +00:00
|
|
|
|
|
|
|
script:
|
|
|
|
notify_family:
|
|
|
|
sequence:
|
|
|
|
- condition: template
|
|
|
|
value_template: '{{ message | trim != "" }}'
|
|
|
|
|
|
|
|
- service: script.notify_on_led_screen
|
|
|
|
data_template:
|
|
|
|
message: "{{ message }}"
|
|
|
|
notify_options: "{{ notify_options }}"
|
|
|
|
|
|
|
|
- service: script.notify_firestick
|
|
|
|
data_template:
|
|
|
|
url: "{{ url }}"
|
|
|
|
title: "{{ title }}"
|
|
|
|
message: "{{ message }}"
|
|
|
|
notify_options: "{{ notify_options }}"
|
|
|
|
|
|
|
|
- service: script.notify_telegram
|
|
|
|
data_template:
|
|
|
|
file: "{{ url }}"
|
|
|
|
title: "{{ title }}"
|
|
|
|
message: "{{ message }}"
|
|
|
|
notify_options: "{{ notify_options }}"
|
|
|
|
|
|
|
|
- service: script.notify_email
|
|
|
|
data_template:
|
|
|
|
title: "{{ title }}"
|
|
|
|
message: "{{ message }}"
|
|
|
|
notify_options: "{{ notify_options }}"
|
|
|
|
|
|
|
|
- service: script.notify_voice
|
|
|
|
data_template:
|
|
|
|
message: "{{ message }}"
|
|
|
|
notify_options: "{{ notify_options }}"
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# NOTIFY OPTIONS
|
|
|
|
# 1. tv
|
|
|
|
# 2. telegram
|
|
|
|
# 3. led
|
|
|
|
# 4. email
|
|
|
|
# 5. voice
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
notify_firestick:
|
|
|
|
sequence:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: input_boolean.firetv_alerts
|
|
|
|
# state: "on"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ 'tv' in notify_options }}"
|
|
|
|
- service: notify.android_tv_fire_tv
|
|
|
|
data:
|
|
|
|
message: "{{ message }}"
|
|
|
|
title: Mahasri Bot
|
|
|
|
data:
|
|
|
|
color: red
|
|
|
|
duration: 7
|
|
|
|
image:
|
|
|
|
path: "{{ url }}" #/config/www/downloads/camera/driveway/driveway_20220604_185216.jpg
|
|
|
|
icon:
|
|
|
|
path: /config/www/{{- [ "suresh.jpg", "srinika.jpg", "mallika.jpg", "hasika.jpg" ] | random -}}
|
|
|
|
|
|
|
|
notify_telegram:
|
|
|
|
sequence:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: input_boolean.text_alerts
|
|
|
|
# state: "on"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ 'telegram' in notify_options }}"
|
|
|
|
- service: telegram_bot.send_message
|
|
|
|
data:
|
|
|
|
title: "{{- title -}}"
|
|
|
|
message: "{{- message -}}"
|
|
|
|
data:
|
|
|
|
photo:
|
|
|
|
- file: "{{- file -}}"
|
|
|
|
caption: "{{- title -}}"
|
|
|
|
|
|
|
|
notify_email:
|
|
|
|
sequence:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: input_boolean.email_alerts
|
|
|
|
# state: "on"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ 'email' in notify_options }}"
|
|
|
|
- service: script.notify_smtp
|
|
|
|
data_template:
|
|
|
|
title: "{{ title }}"
|
|
|
|
message: "{{ message }}"
|
|
|
|
|
|
|
|
notify_voice:
|
|
|
|
sequence:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: input_boolean.voice_alerts
|
|
|
|
# state: "on"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ 'voice' in notify_options }}"
|
|
|
|
- service: script.voice_notify
|
|
|
|
data_template:
|
|
|
|
message: "{{ message }}"
|
|
|
|
|
|
|
|
notify_on_led_screen:
|
|
|
|
sequence:
|
|
|
|
# - condition: state
|
|
|
|
# entity_id: input_boolean.led_alerts
|
|
|
|
# state: "on"
|
|
|
|
- condition: template
|
|
|
|
value_template: "{{ 'led' in notify_options }}"
|
|
|
|
- service: mqtt.publish
|
|
|
|
data_template:
|
|
|
|
topic: messageboard/messages
|
|
|
|
payload: "{{ message }}"
|