98_CustomReadings.pm: fixed the bug when the script returned zero

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8204 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
hcs-svn
2015-03-13 17:32:16 +00:00
parent 030403c9f3
commit 6e5feb905e

View File

@@ -82,7 +82,7 @@ sub CustomReadings_read($)
$isCombined = 0;
}
my $value = 0;
my $value;
if ($isCombined) {
$value = shift @combinedOutput;
@@ -96,7 +96,7 @@ sub CustomReadings_read($)
$value = eval($definition[1]);
}
if($value) {
if(defined $value) {
$value =~ s/^\s+|\s+$//g;
}
else {