Second question: I need to stop the execution once a scene has been executed. Is the "import sys" and "sys.exit()" going to work?
- Code: Select all
# get status of living room ceiling fixture lights
#import sys
scene = indigo.variables[586684114].getValue(int) #
if scene == 0:
indigo.actionGroup.execute(40370896) #scene #1
# update variable to current scene
# scene = 1
indigo.variable.updateValue(586684114, value = 1)
# sys.exit()
if scene == 1:
indigo.actionGroup.execute(1620661527) #scene #2
# update variable to current scene
scene = 2
# indigo.variable.updateValue(586684114, value==2)
# sys.exit()