Hello,
I have configured notifications for doors and windows sensors. This is the automation script that I use:
- action:
- service: ifttt.trigger
data_template:
event: Status_Change_Notification
value1: "{% if trigger.to_state.state == 'on' %}Garage Entry Door was Opened{% else %}Garage Entry Door was Closed{% endif %}"
alias: 'Garage Entry Door Status Change'
id: '1499707625056'
trigger:
- platform: state
entity_id: binary_sensor.garage_entry
Everything works without any issues. The problem started when I tried to use the same automation script for my devices that I use Ping to monitor.
I found that Ping sensor sends “on” every five minutes. I had to create new two automation scripts per Ping sensor. One sends notification when status changes from ‘on’ to ‘off’ and the second one is to send notification when status changes from ‘off’ to ‘on’.
I have a few devices that I want to track and want to know if there is a way to do it with one automation script instead of two.