limit max viisiblity to 10km
This commit is contained in:
parent
46339771da
commit
011479fa51
@ -710,7 +710,10 @@ def updateWeather(api_key, logf):
|
||||
current_weather['feels_like'] = r['hourly']['apparent_temperature'][index_pos]
|
||||
current_weather['humidity'] = r['hourly']['relativehumidity_2m'][index_pos]
|
||||
current_weather['clouds'] = r['hourly']['cloudcover'][index_pos]
|
||||
current_weather['visibility'] = r['hourly']['visibility'][index_pos]
|
||||
if r['hourly']['visibility'][index_pos] > 10000:
|
||||
current_weather['visibility'] = 10000
|
||||
else:
|
||||
current_weather['visibility'] = r['hourly']['visibility'][index_pos]
|
||||
current_weather['uv'] = r['hourly']['uv_index'][index_pos]
|
||||
current_weather['rain_chance'] = r['hourly']['precipitation_probability'][index_pos]
|
||||
current_weather['wind_speed'] = r['hourly']['windspeed_10m'][index_pos]
|
||||
|
Loading…
Reference in New Issue
Block a user