Allow users not using Zimmerman method to use California restriction
This commit is contained in:
@@ -166,7 +166,7 @@ def application(environ, start_response):
|
|||||||
except:
|
except:
|
||||||
toffset=-1
|
toffset=-1
|
||||||
|
|
||||||
if (uwt > 0):
|
if (key != ''):
|
||||||
try:
|
try:
|
||||||
req = urllib2.urlopen('http://api.wunderground.com/api/'+key+'/yesterday/conditions/q/'+urllib.quote(loc)+'.json')
|
req = urllib2.urlopen('http://api.wunderground.com/api/'+key+'/yesterday/conditions/q/'+urllib.quote(loc)+'.json')
|
||||||
dat = json.load(req)
|
dat = json.load(req)
|
||||||
@@ -195,6 +195,7 @@ def application(environ, start_response):
|
|||||||
if v:
|
if v:
|
||||||
h_today = safe_float(v, h_today)
|
h_today = safe_float(v, h_today)
|
||||||
|
|
||||||
|
if (uwt === 1):
|
||||||
# calculate water time scale, per https://github.com/rszimm/sprinklers_pi/blob/master/Weather.cpp
|
# calculate water time scale, per https://github.com/rszimm/sprinklers_pi/blob/master/Weather.cpp
|
||||||
hf = 0
|
hf = 0
|
||||||
if (maxh>=0) and (minh>=0):
|
if (maxh>=0) and (minh>=0):
|
||||||
|
|||||||
Reference in New Issue
Block a user