Using IFTTT as a script using a data template and variables!

This commit is contained in:
CCOSTAN
2016-12-01 01:17:52 +00:00
parent 3d1951f75d
commit b7fd741c06
8 changed files with 28 additions and 18 deletions

View File

@@ -8,6 +8,10 @@
platform: numeric_state
entity_id: sensor.badlogin
above: 1
action:
service: ifttt.trigger
data: {"event":"ifttt_notify", "value1":"Home Assistant Error: ", "value2":"Login Failure Detected"}
service: script.ifttt_notify
data_template:
value1: 'Bad Login: '
value2: 'There was a Hack attempt!'
value3: ''

View File

@@ -25,10 +25,8 @@
- sensor.garadget_small
- sensor.garadget_large
action:
service: script.turn_on
entity_id: script.notify_ifttt
service: script.ifttt_notify
data_template:
variables:
value1: 'Device Status '
value2: "{{ trigger.entity_id.split('.')[1] }} is "
value3: "{{ trigger.to_state.state }}"
value1: 'Device Status:'
value2: "{{ trigger.entity_id.split('.')[1] }} is "
value3: "{{ trigger.to_state.state }}"

View File

@@ -8,10 +8,8 @@
platform: event
event_type: homeassistant_start
action:
service: script.turn_on
entity_id: script.notify_ifttt
service: script.ifttt_notify
data_template:
variables:
value1: "Startup: Home Assistant is Up and Running!"
value2: ""
value3: ""
value1: 'Startup: Home Assistant is Up and Running!'
value2: ''
value3: ''

View File

@@ -9,8 +9,11 @@
value_template: "{{ states('updater.updater') != 'unknown' }}"
action:
- service: ifttt.trigger
data: {"event":"ifttt_notify", "value1":"Home Assistant Update: ", "value2":"Available"}
- service: script.ifttt_notify
data_template:
value1: 'There is a new Version of Home-Assistant Available.'
value2: "{{ states('updater.updater') }}"
value3: ''
- service: notify.html5
data_template: