mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
fixed case when no readings are present
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@6431 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
647e3a51ef
commit
359f6bfc36
@ -429,8 +429,11 @@ sub Weather_Get($@) {
|
||||
if(defined($hash->{READINGS}{$reading})) {
|
||||
$value= $hash->{READINGS}{$reading}{VAL};
|
||||
} else {
|
||||
return "Unknown reading $reading, choose one of " .
|
||||
join(" ", sort keys($hash->{READINGS}));
|
||||
my $rt= "";
|
||||
if(defined($hash->{READINGS})) {
|
||||
$rt= join(" ", sort keys($hash->{READINGS}));
|
||||
}
|
||||
return "Unknown reading $reading, choose one of " . $rt;
|
||||
}
|
||||
|
||||
return "$a[0] $reading => $value";
|
||||
|
Loading…
x
Reference in New Issue
Block a user