So it took me a good part of last night looking at examples on the internet, but managed to put this together. From reading information on delays, I decided to use an external file to be proceed.
The code below works FINE as an embedded python scrips, but will not run as an external file.
As a complete novice to Python, I am surprised just how much it cares that each line be indented just so...
Here is the code, any thing jump out as to why I cannot run as an external file in indigo action group?
- Code: Select all
#Gate Logic Script
import time
if indigo.variables[1335916415].value == "false" : # if it is nighttime do this
indigo.actionGroup.execute(387291483) # "ag_Security"
indigo.actionGroup.execute(513003517) # "Backyard On"
time.sleep(2)
indigo.server.speak("Hi there, since it is after hours, we would rather you rang the doorbell.")
time.sleep(9)
indigo.actionGroup.execute(1142413630) # "Audio_RestoreAudioState"
else:
indigo.actionGroup.execute(165084610) # "Audio_SaveAudioState"
time.sleep(2)
indigo.actionGroup.execute(387291483) # "ag_Security"
indigo.server.speak("HI, and Welcome to Cassa Divina! I have announced your arrival. Enjoy your visit!" )
time.sleep(9)
indigo.actionGroups[1142413630] # "Audio_RestoreAudioState"
Thanks!