Below is the code, but I keep getting this error message:
embedded script, line 4, at top level
AttributeError: 'list' object has no attribute 'updateValue'
I've updated variables in Python countless times, but this just isn't working. Just trying to put the device state into the variable fails. I'm also not sure the math part is going to work, but I guess one thing at a time.
- Code: Select all
HeatTimer = indigo.devices[397890962]
D0Heat = HeatTimer.states['secondsDay00'] #time in seconds
indigo.variable.updateValue(523352543, D0Heat) #update variable
Minutes = "{:.2f}".format(float(D0Heat) /60.0) #convert seconds to minutes
indigo.variable.updateValue(1392022438, Minutes) #update variable