My attempt:
- Code: Select all
hseOcc = indigo.variables[612296111].getValue(bool) #
if hseOcc = true: # I also tried "true", and 1
indigo.variables.updateValue[612296111] = false #
else
indigo.variable.updateValue(612296111) = true #
gives me an invalid syntax error.
Eliminating all but the first line also produces a syntax error.
Using the Extending Indigo documents, I tried:
- Code: Select all
hseOcc = indigo.variable[612296111]
if hseOcc == "true":
indigo.variable.updateValue[612296111], "false" #
else:
indigo.variable.updateValue(612296111), "true" #
The log error for this is"embedded script, line 1, at top level
TypeError: 'VariableCmds' object does not support indexing.
Suggestions?
BTW, I know I could do this with triggers, but I'm still determined to make something work with Python. This seems like an easy problem and learning opportunity for me.
Thanks,
Bob