From 153bbece2e1b61516e1450df3f37bcc0ba24b997 Mon Sep 17 00:00:00 2001 From: Lieven Hollevoet Date: Fri, 27 Dec 2013 13:27:39 +0100 Subject: [PATCH] Fix submitted by @JohanBraeken to update the calculated dewpoint every time the humidity is measured. Fixes #329 --- lib/Weather_Common.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Weather_Common.pm b/lib/Weather_Common.pm index 5dcc5119c..77affbb25 100644 --- a/lib/Weather_Common.pm +++ b/lib/Weather_Common.pm @@ -88,7 +88,7 @@ sub weather_updated { } # calculate dew point if missing, but we have temp and humid - if ($temp ne 'unknown' and $humidity ne 'unknown' and $dewpoint eq 'unknown') { + if ($temp ne 'unknown' and $humidity ne 'unknown' and $$w{HumidOutdoorMeasured}) { my $humidity=$$w{HumidOutdoor}; $dewpoint=convert_humidity_to_dewpoint($humidity ,$temp); # $dewpoint is in Celsius at this point $$w{DewOutdoor}=$main::config_parms{weather_uom_temp} eq 'F' ? &::convert_c2f($dewpoint) : $dewpoint;