bugfix specialDeltaPeriodHours

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@6036 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch
2014-06-03 05:27:57 +00:00
parent 93c1a5852c
commit 42c876faa4

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);