Here's what I've tired:
- Code: Select all
theVar1 = indigo.variables[305363100] #Thermostat
theVar2 = indigo.variables[1728838522] #ExtDevice
theAverage =str(float(theVar1.value) + float(theVar2.value)) / 2 #Average
indigo.variable.updateValue(655793661, ((theAverage)))
I also tried summing in the 1st equation, and dividing in the 2nd, like this:
- Code: Select all
theSum =str(float(theVar1.value) + float(theVar2.value)) #Sum
theAverage =theSum / 2
Again trying different arrangements of the "/" and the "2", but still doesn't work.
My last attempt was this:
- Code: Select all
theSum =str(float(theVar1.value) + float(theVar2.value)) #Sum
theAverage =str(float(theSum.value)/2) #Average
But again... nothing.
Any suggestions?