2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

avoid updating weather information on get (59_Weather.pm)

git-svn-id: https://svn.fhem.de/fhem/trunk@6424 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2014-08-19 20:33:22 +00:00
parent 93cae33309
commit 7a9abe2f87
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- change: avoid updating weather information on get (59_Weather.pm)
- change: removed noshutdown=0 for HTTP connections made in 57_Calendar.pm
and 59_Weather.pm to address issues when FHEM is behind
a web proxy

View File

@ -423,15 +423,14 @@ sub Weather_Get($@) {
return "argument is missing" if(int(@a) != 2);
Weather_GetUpdateLocal($hash);
my $reading= $a[1];
my $value;
if(defined($hash->{READINGS}{$reading})) {
$value= $hash->{READINGS}{$reading}{VAL};
} else {
return "no such reading: $reading";
return "Unknown reading $reading, choose one of " .
join(" ", sort keys($hash->{READINGS}));
}
return "$a[0] $reading => $value";