OpenSprinkler › Forums › Hardware Questions › OpenSprinkler Pi (OSPi) › Bug in weather_level_adj.py plugin › Reply To: Bug in weather_level_adj.py plugin
November 20, 2014 at 2:14 am
#34749
ShawnHarte
Participant
You could just use any variant of a safe float/int function for example:
def safe_float(s,d):
try:
return float(s)
except:
return d
Then just replace any instance of float in your script with safe_float(data, defaultfloat value)