2018-01-02 00:00:45 +00:00
|
|
|
######################################################################################################
|
|
|
|
###Script to send notifications to IFTTT to notify me on the mobile Phone! Call like this:
|
|
|
|
# action:
|
|
|
|
# service: script.notify_engine
|
|
|
|
# data_template:
|
2019-03-16 22:05:28 +00:00
|
|
|
# title: 'Ios Title'
|
2018-01-02 00:00:45 +00:00
|
|
|
# value1: 'Startup: Home Assistant is Up and Running!'
|
2019-03-16 22:05:28 +00:00
|
|
|
# value2: "{{ trigger.to_state.state }}"
|
|
|
|
# value3:
|
2018-01-02 00:00:45 +00:00
|
|
|
# who: "stacey | carlo | paige | family | parents"
|
2019-03-16 22:05:28 +00:00
|
|
|
# camera_entity: 'Camera.Camera'
|
|
|
|
# content-type: "jpeg"
|
2018-01-02 00:00:45 +00:00
|
|
|
|
|
|
|
# IFTTT Maker channel should look like this: https://files.gitter.im/home-assistant/home-assistant/phkx/blob
|
|
|
|
######################################################################################################
|
|
|
|
|
|
|
|
notify_engine:
|
2018-02-25 21:00:30 +00:00
|
|
|
sequence:
|
|
|
|
- condition: or
|
|
|
|
conditions:
|
|
|
|
- condition: state
|
|
|
|
entity_id: input_boolean.text_notifications
|
|
|
|
state: 'on'
|
2018-01-02 00:00:45 +00:00
|
|
|
# - service: ifttt.trigger
|
|
|
|
# data_template: {"event":"notify_engine", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
|
|
|
|
|
|
|
|
- service_template: >
|
|
|
|
{% if who == 'stacey' %}
|
|
|
|
notify.ios_staceys_iphone
|
|
|
|
{% elif who == 'carlo' %}
|
2019-03-29 02:10:37 +00:00
|
|
|
notify.ios_carloxsmax
|
2018-01-02 00:00:45 +00:00
|
|
|
{% elif who == 'parents' %}
|
|
|
|
notify.ios_parents
|
2019-03-16 21:36:18 +00:00
|
|
|
{% elif who == 'family' %}
|
|
|
|
notify.ios_family
|
2018-01-02 00:00:45 +00:00
|
|
|
{% else %}
|
|
|
|
notify.ios_family
|
|
|
|
{% endif %}
|
|
|
|
data_template:
|
2019-03-16 21:36:18 +00:00
|
|
|
title: "{{ title }}"
|
2018-01-02 00:00:45 +00:00
|
|
|
message: "{{ value1 }} {{ value2 }} {{ value3 }}"
|
|
|
|
data:
|
2019-03-16 21:36:18 +00:00
|
|
|
attachment:
|
2019-03-29 01:35:47 +00:00
|
|
|
url: "{{ url }}"
|
2019-03-16 21:36:18 +00:00
|
|
|
content-type: "{{ content_type }}"
|
2019-03-16 22:05:28 +00:00
|
|
|
hide-thumbnail: false
|
2019-03-16 22:57:17 +00:00
|
|
|
push:
|
|
|
|
sound: "{{ ios_sound }}"
|
|
|
|
badge: "{{ ios_badge }}"
|
|
|
|
category: "{{ ios_category }}"
|
2019-03-16 21:36:18 +00:00
|
|
|
entity_id: "{{ camera_entity }}"
|