2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

92_FileLog.pm: do not convert min/max values to "undef" (Forum #52031)

git-svn-id: https://svn.fhem.de/fhem/trunk@11265 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2016-04-17 11:19:15 +00:00
parent 84cf32c1a1
commit 62aed27ba7

View File

@ -874,11 +874,11 @@ RESCAN:
} }
my $j = $i+1; my $j = $i+1;
$data{"min$j"} = $min[$i] == 999999 ? "undef" : $min[$i]; $data{"min$j"} = $min[$i];
$data{"max$j"} = $max[$i] == -999999 ? "undef" : $max[$i]; $data{"max$j"} = $max[$i];
$data{"avg$j"} = $cnt[$i] ? sprintf("%0.1f", $sum[$i]/$cnt[$i]) : "undef"; $data{"avg$j"} = $cnt[$i] ? sprintf("%0.1f", $sum[$i]/$cnt[$i]) : 0;
$data{"sum$j"} = $sum[$i]; $data{"sum$j"} = $sum[$i];
$data{"cnt$j"} = $cnt[$i] ? $cnt[$i] : "undef"; $data{"cnt$j"} = $cnt[$i];
$data{"currval$j"} = $lastv[$i]; $data{"currval$j"} = $lastv[$i];
$data{"currdate$j"} = $lastd[$i]; $data{"currdate$j"} = $lastd[$i];
$data{"firstval$j"} = $firstv[$i]; $data{"firstval$j"} = $firstv[$i];