2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

bugfix specialDeltaPeriodHours

git-svn-id: https://svn.fhem.de/fhem/trunk@6036 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2014-06-03 05:27:57 +00:00
parent 20776901b0
commit ada0441c98

View File

@ -100,7 +100,6 @@ statistics_Initialize($)
."excludedReadings "
."minAvgMaxReadings "
."periodChangePreset "
."singularReadings "
."specialDeltaPeriodHours "
.$readingFnAttributes;
}
@ -700,10 +699,10 @@ statistics_doStatisticSpecialPeriod ($$$$$)
if (exists ($hash->{READINGS}{$hiddenReadingName}{VAL})) { $result .= " " . $hash->{READINGS}{$hiddenReadingName}{VAL}; }
my @hidden = split / /, $result; # Internal values
if ( exists($hidden[$specialPeriod]) ) { delete $hidden[$specialPeriod]; }
$result = 0;
foreach my $val (@hidden) { $result += $val; }
$result = sprintf "%.".$decPlaces."f", $result;
if ($#hidden != $specialPeriod) { $result .= " (".($#hidden+1)."_hours)"; }
if ($#hidden != $specialPeriod) { $result .= " (".($#hidden+1).".hours)"; }
readingsBulkUpdate($dev, $statReadingName, $result, 1);
$result = join( " ", @hidden );
readingsSingleUpdate($hash, $hiddenReadingName, $result, 0);