mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
bugfix specialDeltaPeriodHours
git-svn-id: https://svn.fhem.de/fhem/trunk@6036 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
20776901b0
commit
ada0441c98
@ -100,7 +100,6 @@ statistics_Initialize($)
|
|||||||
."excludedReadings "
|
."excludedReadings "
|
||||||
."minAvgMaxReadings "
|
."minAvgMaxReadings "
|
||||||
."periodChangePreset "
|
."periodChangePreset "
|
||||||
."singularReadings "
|
|
||||||
."specialDeltaPeriodHours "
|
."specialDeltaPeriodHours "
|
||||||
.$readingFnAttributes;
|
.$readingFnAttributes;
|
||||||
}
|
}
|
||||||
@ -700,10 +699,10 @@ statistics_doStatisticSpecialPeriod ($$$$$)
|
|||||||
if (exists ($hash->{READINGS}{$hiddenReadingName}{VAL})) { $result .= " " . $hash->{READINGS}{$hiddenReadingName}{VAL}; }
|
if (exists ($hash->{READINGS}{$hiddenReadingName}{VAL})) { $result .= " " . $hash->{READINGS}{$hiddenReadingName}{VAL}; }
|
||||||
my @hidden = split / /, $result; # Internal values
|
my @hidden = split / /, $result; # Internal values
|
||||||
if ( exists($hidden[$specialPeriod]) ) { delete $hidden[$specialPeriod]; }
|
if ( exists($hidden[$specialPeriod]) ) { delete $hidden[$specialPeriod]; }
|
||||||
|
$result = 0;
|
||||||
foreach my $val (@hidden) { $result += $val; }
|
foreach my $val (@hidden) { $result += $val; }
|
||||||
$result = sprintf "%.".$decPlaces."f", $result;
|
$result = sprintf "%.".$decPlaces."f", $result;
|
||||||
if ($#hidden != $specialPeriod) { $result .= " (".($#hidden+1)."_hours)"; }
|
if ($#hidden != $specialPeriod) { $result .= " (".($#hidden+1).".hours)"; }
|
||||||
readingsBulkUpdate($dev, $statReadingName, $result, 1);
|
readingsBulkUpdate($dev, $statReadingName, $result, 1);
|
||||||
$result = join( " ", @hidden );
|
$result = join( " ", @hidden );
|
||||||
readingsSingleUpdate($hash, $hiddenReadingName, $result, 0);
|
readingsSingleUpdate($hash, $hiddenReadingName, $result, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user