I have read on the forum trying to find a method of reading a variable and storing it into another variable using Python
I'm very new to Python. I recently found that Indigo variables are stored as strings. So any integers or floats have to be put to a string before storing into a variable. Thanks to FlyingDiver who pointed this out in a previous post of mine.
The problem is that after running the code, the destination variable HumidityTempDiffGarageNorth contains this : "description :"
HumidityOutsideTemp is equal to "45".
Here is my code:
test = indigo.variables[240228976] # "HumidityOutsideTemp"]
indigo.variable.updateValue("HumidityTempDiffGarageNorth", str(test))
After running this, the variable "HumidityTempDiffGarageNorth" has the contents of "description :"
No errors were generated in the Events log:
So I thought I'd just load "test" with a number in this case "23" and see if it stores it correctly: So the code is :
test = 23
indigo.variable.updateValue("HumidityTempDiffGarageNorth", str(test))
After running the code (still no errors) "23" was correctly stored in variable" HumidityTempDiffGarageNorth"
I'm probably overlooking something.
Any help would be appreciated.