mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-15 14:16:08 +00:00
Using IFTTT as a script using a data template and variables!
This commit is contained in:
parent
3d1951f75d
commit
b7fd741c06
@ -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: ''
|
||||
|
@ -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 }}"
|
||||
|
@ -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: ''
|
||||
|
@ -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:
|
||||
|
@ -105,5 +105,5 @@ sensor: !include_dir_merge_list sensor
|
||||
automation: !include_dir_merge_list automation
|
||||
scene: !include_dir_merge_list scene
|
||||
switch: !include_dir_merge_list switch
|
||||
script: !include_dir_merge_list script
|
||||
script: !include_dir_merge_named script
|
||||
input_boolean: !include_dir_merge_named input_boolean
|
||||
|
@ -29,6 +29,9 @@ group.all_lights:
|
||||
group.all_switches:
|
||||
hidden: false
|
||||
|
||||
group.all_scripts:
|
||||
hidden: false
|
||||
|
||||
group.all_automations:
|
||||
emulated_hue: false
|
||||
hidden: false
|
||||
|
@ -70,3 +70,4 @@ Info:
|
||||
- group.all_lights
|
||||
- group.all_switches
|
||||
- group.all_automations
|
||||
- group.all_scripts
|
||||
|
@ -1,5 +1,8 @@
|
||||
######################################################################################################
|
||||
###Script to send notifications to IFTTT to notify me on the mobile Phone!
|
||||
######################################################################################################
|
||||
|
||||
notify_ifttt:
|
||||
ifttt_notify:
|
||||
sequence:
|
||||
- service: ifttt.trigger
|
||||
data_template: {"event":"ifttt_notify", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
|
||||
|
Loading…
x
Reference in New Issue
Block a user