Skip to content

Commit

Permalink
Merge pull request #350 from mstovenour/fix_issue_349
Browse files Browse the repository at this point in the history
Fix issue #349: internet_weather.pl negative temp
  • Loading branch information
mstovenour committed Jan 3, 2014
2 parents eb5ece3 + b56332f commit a58c804
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/common/internet_weather.pl
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ sub normalize_conditions {
$forecast = read_all $f_weather_forecast;

if (length($forecast) < 50) {
respond "app=weather Last weather forecast received was incomplete."
respond("app=weather Last weather forecast received was incomplete.");
} else {
respond "app=weather $forecast";
respond("app=weather $forecast");
}
}

Expand All @@ -113,7 +113,7 @@ sub normalize_conditions {
$conditions = read_all $f_weather_conditions;
$conditions = normalize_conditions($conditions);

respond "app=weather $conditions";
respond("app=weather $conditions");
}

if (done_now $p_weather_forecast) {
Expand All @@ -140,7 +140,7 @@ sub normalize_conditions {

$conditions = normalize_conditions($conditions);

$w{TempOutdoor} = $1 if $conditions =~ /(\d+) degrees/i;
$w{TempOutdoor} = $1 if $conditions =~ /(-?\d+) degrees/i;
if ($conditions =~ /(\d+)\%/) {
$w{HumidOutdoor} = $1;
$w{HumidOutdoorMeasured}=1; # tell Weather_Common that we directly measured humidity
Expand Down

0 comments on commit a58c804

Please sign in to comment.