norcoscia wrote:I created the dir variable in the first part of the trigger (below)
I don't understand how to store the python variable into an indigo variable or how that will fix the error in the script?
Python variables are not Indigo variables. You stored a state into an Indigo variable. That does not create a variable in the Python script.
Read the Variables section of
https://wiki.indigodomo.com/doku.php?id ... g_tutorialIn this case, you don't even need the Indigo 'dir' variable. Change the device number to match your meteobridge device.
- Code: Select all
dir = int(indigo.devices[623595257].states["WIND_dir"])
wind_direction = ['N','NE','E','SE','S','SW','W','NW'][int(((dir+22.5)%360)/45)]
newVar = indigo.variable.create("wind_direction", "-")
indigo.variable.updateValue(newVar, "wind_direction")