Skip to content

Commit

Permalink
Fix submitted by @JohanBraeken to update the calculated dewpoint ever…
Browse files Browse the repository at this point in the history
…y time the humidity is measured.

Fixes #329
  • Loading branch information
hollie committed Dec 27, 2013
1 parent 7abfb85 commit 153bbec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Weather_Common.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 153bbec

Please sign in to comment.