mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-02-19 07:47:27 +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
|
platform: numeric_state
|
||||||
entity_id: sensor.badlogin
|
entity_id: sensor.badlogin
|
||||||
above: 1
|
above: 1
|
||||||
|
|
||||||
action:
|
action:
|
||||||
service: ifttt.trigger
|
service: script.ifttt_notify
|
||||||
data: {"event":"ifttt_notify", "value1":"Home Assistant Error: ", "value2":"Login Failure Detected"}
|
data_template:
|
||||||
|
value1: 'Bad Login: '
|
||||||
|
value2: 'There was a Hack attempt!'
|
||||||
|
value3: ''
|
||||||
|
@ -25,10 +25,8 @@
|
|||||||
- sensor.garadget_small
|
- sensor.garadget_small
|
||||||
- sensor.garadget_large
|
- sensor.garadget_large
|
||||||
action:
|
action:
|
||||||
service: script.turn_on
|
service: script.ifttt_notify
|
||||||
entity_id: script.notify_ifttt
|
|
||||||
data_template:
|
data_template:
|
||||||
variables:
|
value1: 'Device Status:'
|
||||||
value1: 'Device Status '
|
value2: "{{ trigger.entity_id.split('.')[1] }} is "
|
||||||
value2: "{{ trigger.entity_id.split('.')[1] }} is "
|
value3: "{{ trigger.to_state.state }}"
|
||||||
value3: "{{ trigger.to_state.state }}"
|
|
||||||
|
@ -8,10 +8,8 @@
|
|||||||
platform: event
|
platform: event
|
||||||
event_type: homeassistant_start
|
event_type: homeassistant_start
|
||||||
action:
|
action:
|
||||||
service: script.turn_on
|
service: script.ifttt_notify
|
||||||
entity_id: script.notify_ifttt
|
|
||||||
data_template:
|
data_template:
|
||||||
variables:
|
value1: 'Startup: Home Assistant is Up and Running!'
|
||||||
value1: "Startup: Home Assistant is Up and Running!"
|
value2: ''
|
||||||
value2: ""
|
value3: ''
|
||||||
value3: ""
|
|
||||||
|
@ -9,8 +9,11 @@
|
|||||||
value_template: "{{ states('updater.updater') != 'unknown' }}"
|
value_template: "{{ states('updater.updater') != 'unknown' }}"
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: ifttt.trigger
|
- service: script.ifttt_notify
|
||||||
data: {"event":"ifttt_notify", "value1":"Home Assistant Update: ", "value2":"Available"}
|
data_template:
|
||||||
|
value1: 'There is a new Version of Home-Assistant Available.'
|
||||||
|
value2: "{{ states('updater.updater') }}"
|
||||||
|
value3: ''
|
||||||
|
|
||||||
- service: notify.html5
|
- service: notify.html5
|
||||||
data_template:
|
data_template:
|
||||||
|
@ -105,5 +105,5 @@ sensor: !include_dir_merge_list sensor
|
|||||||
automation: !include_dir_merge_list automation
|
automation: !include_dir_merge_list automation
|
||||||
scene: !include_dir_merge_list scene
|
scene: !include_dir_merge_list scene
|
||||||
switch: !include_dir_merge_list switch
|
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
|
input_boolean: !include_dir_merge_named input_boolean
|
||||||
|
@ -29,6 +29,9 @@ group.all_lights:
|
|||||||
group.all_switches:
|
group.all_switches:
|
||||||
hidden: false
|
hidden: false
|
||||||
|
|
||||||
|
group.all_scripts:
|
||||||
|
hidden: false
|
||||||
|
|
||||||
group.all_automations:
|
group.all_automations:
|
||||||
emulated_hue: false
|
emulated_hue: false
|
||||||
hidden: false
|
hidden: false
|
||||||
|
@ -70,3 +70,4 @@ Info:
|
|||||||
- group.all_lights
|
- group.all_lights
|
||||||
- group.all_switches
|
- group.all_switches
|
||||||
- group.all_automations
|
- 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:
|
sequence:
|
||||||
- service: ifttt.trigger
|
- service: ifttt.trigger
|
||||||
data_template: {"event":"ifttt_notify", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
|
data_template: {"event":"ifttt_notify", "value1":"{{ value1 }}", "value2":"{{ value2 }}", "value3":"{{ value3 }}"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user