jay (support) wrote:Or write a script as an additional action that checks the variable and turns on the siren.
# Script to turn siren on if houseMode="away"
houseMode = indigo.variables[13706081] #houseMode variable
if houseMode.value == "away":
indigo.device.turnOn(920113160) #turn on siren
# Script to turn siren off in 1 minute, if houseMode="away" (delay 1 minute)
houseMode = indigo.variables[13706081] #houseMode variable
if houseMode.value == "away":
indigo.device.turnOff(920113160) #turn off siren
howartp wrote:Have a look at the 3rd example on http://wiki.indigodomo.com/doku.php?id= ... g_tutorial
You can set auto-off in your turnOn command so you don't need two seperate actions with a 1 minute delay.
Sent from my iPhone using Tapatalk
# Script to turn siren on if houseMode="away"
houseMode = indigo.variables[13706081] #houseMode variable
if houseMode.value == "away":
indigo.device.turnOn(920113160, duration=60) #turn on siren for 1 minute
Users browsing this forum: No registered users and 5 guests