mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-20 07:16:03 +00:00
statistics: fixed leading space
git-svn-id: https://svn.fhem.de/fhem/trunk@8493 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b2e560adb4
commit
4e8f1fbedc
@ -492,7 +492,7 @@ statistics_doStatisticMinMax ($$$$$)
|
|||||||
|
|
||||||
# Get reading, cut out first number without units
|
# Get reading, cut out first number without units
|
||||||
my $value = $dev->{READINGS}{$readingName}{VAL};
|
my $value = $dev->{READINGS}{$readingName}{VAL};
|
||||||
$value =~ s/(-?[\d.]*).*/$1/e;
|
$value =~ s/\s*(-?[\d.]*).*/$1/e;
|
||||||
|
|
||||||
statistics_Log $hash, 4, "Calculating min/avg/max statistics for '".$dev->{NAME}.":$readingName = $value'";
|
statistics_Log $hash, 4, "Calculating min/avg/max statistics for '".$dev->{NAME}.":$readingName = $value'";
|
||||||
# statistics_doStatisticMinMaxSingle: $hash, $readingName, $value, $saveLast
|
# statistics_doStatisticMinMaxSingle: $hash, $readingName, $value, $saveLast
|
||||||
@ -597,7 +597,7 @@ sub statistics_doStatisticTendency ($$$)
|
|||||||
|
|
||||||
# Get reading, cut out first number without units
|
# Get reading, cut out first number without units
|
||||||
my $value = $dev->{READINGS}{$readingName}{VAL};
|
my $value = $dev->{READINGS}{$readingName}{VAL};
|
||||||
$value =~ s/([-\d.]*).*/$1/e;
|
$value =~ s/\s*(-?[\d.]*).*/$1/e;
|
||||||
statistics_Log $hash, 4, "Calculating hourly tendency statistics for '".$dev->{NAME}.":$readingName = $value'";
|
statistics_Log $hash, 4, "Calculating hourly tendency statistics for '".$dev->{NAME}.":$readingName = $value'";
|
||||||
|
|
||||||
my $statReadingName = $hash->{PREFIX} . ucfirst($readingName) . "Tendency";
|
my $statReadingName = $hash->{PREFIX} . ucfirst($readingName) . "Tendency";
|
||||||
@ -670,7 +670,7 @@ sub statistics_doStatisticDelta ($$$$)
|
|||||||
|
|
||||||
# Get reading, extract first number without units
|
# Get reading, extract first number without units
|
||||||
my $value = $dev->{READINGS}{$readingName}{VAL};
|
my $value = $dev->{READINGS}{$readingName}{VAL};
|
||||||
$value =~ s/([-\d.]*).*/$1/e;
|
$value =~ s/\s*(-?[\d.]*).*/$1/e;
|
||||||
statistics_Log $hash, 4, "Calculating delta statistics for '".$dev->{NAME}.":$readingName = $value'";
|
statistics_Log $hash, 4, "Calculating delta statistics for '".$dev->{NAME}.":$readingName = $value'";
|
||||||
|
|
||||||
my $hiddenReadingName = ".".$dev->{NAME}.":".$readingName;
|
my $hiddenReadingName = ".".$dev->{NAME}.":".$readingName;
|
||||||
@ -820,7 +820,7 @@ sub statistics_doStatisticSpecialPeriod ($$$$$)
|
|||||||
my $result = 0;
|
my $result = 0;
|
||||||
foreach (@hidden) { $result += $_; }
|
foreach (@hidden) { $result += $_; }
|
||||||
$result = sprintf "%.".$decPlaces."f", $result;
|
$result = sprintf "%.".$decPlaces."f", $result;
|
||||||
if ($#hidden + 1 != $specialPeriod) { $result .= " (".($#hidden+1).".hours)"; }
|
if ($#hidden != $specialPeriod) { $result .= " (".$#hidden.".hours)"; }
|
||||||
readingsBulkUpdate($dev, $statReadingName, $result, 1);
|
readingsBulkUpdate($dev, $statReadingName, $result, 1);
|
||||||
|
|
||||||
# Store hidden stack
|
# Store hidden stack
|
||||||
|
Loading…
x
Reference in New Issue
Block a user