I've created a handful of scripts with basic if statements by getting a variable and then testing it by name without an issue.
For some reason I've created a new script and cannot get the if statement to test true without adding a .value to the end of the variable name.
For example the script below does not work:
- Code: Select all
Humidistat = indigo.variables[723609922]
Dehumidifier = indigo.variables[1735952667]
if Humidistat == "Off" and Dehumidifier == "On":
indigo.actionGroup.execute(72705535)
For example the script below does work:
- Code: Select all
Humidistat = indigo.variables[723609922]
Dehumidifier = indigo.variables[1735952667]
if Humidistat.value == "Off" and Dehumidifier.value == "On":
indigo.actionGroup.execute(72705535)
Is there a certain requirement that I have to add the .value to the end to certain variables?