From ada0441c989d8b9e9d508b86b8c83686803bfe03 Mon Sep 17 00:00:00 2001 From: tpoitzsch <> Date: Tue, 3 Jun 2014 05:27:57 +0000 Subject: [PATCH] bugfix specialDeltaPeriodHours git-svn-id: https://svn.fhem.de/fhem/trunk@6036 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_statistics.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/98_statistics.pm b/fhem/FHEM/98_statistics.pm index 0be874b76..985409d9d 100644 --- a/fhem/FHEM/98_statistics.pm +++ b/fhem/FHEM/98_statistics.pm @@ -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);