Need help with a script! Here is the script that I failed miserably with.
from datatime import datatime
sensor = indigo.devices[710337117] # "Front Door Sensor"
timeDelta = datetime.now() - sensor.lastChanged
if sensor.onState and timeDelta.seconds > 15:
indigo.device.turnOn([1897472413], duration=6)
What I was trying to do is set up a trigger when my front door sensor a trigger on (open) state for 15 seconds it would notify me by turning on the light (1897472413) for 6 seconds.
Eventually I was hoping to set it up this way and notify me with the pushover notifications app as well in the future. Would this be the easy's way to achieve this type of action?