From e5e9b242c8140bff63af320407267e1569a9ded4 Mon Sep 17 00:00:00 2001 From: Samer Albahra Date: Sun, 5 Jul 2015 16:53:49 -0500 Subject: [PATCH] Fix bug incorporating precipitation values for WUnderground --- routes/weather.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routes/weather.js b/routes/weather.js index 7e9b3a7..4cd62e8 100644 --- a/routes/weather.js +++ b/routes/weather.js @@ -69,7 +69,7 @@ function getWeatherUndergroundData( location, weatherUndergroundKey, callback ) minTemp: parseInt( data.history.dailysummary[0].mintempi ), temp: parseInt( data.current_observation.temp_f ), humidity: ( parseInt( data.history.dailysummary[0].maxhumidity ) + parseInt( data.history.dailysummary[0].minhumidity ) ) / 2, - precip: ( parseInt( data.current_observation.precip_today_in ) || 0 ) + ( parseInt( data.history.dailysummary[0].precipi ) || 0 ), + precip: ( parseFloat( data.current_observation.precip_today_in ) || 0 ) + ( parseFloat( data.history.dailysummary[0].precipi ) || 0 ), solar: parseInt( data.current_observation.UV ), wind: parseInt( data.history.dailysummary[0].meanwindspdi ), elevation: parseInt( data.current_observation.observation_location.elevation )