2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 19:32:42 +00:00

statistics: 2nd try neg. val.

git-svn-id: https://svn.fhem.de/fhem/trunk@7113 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch 2014-12-01 20:31:49 +00:00
parent d9688197c3
commit 8f7adb9ad9

View File

@ -505,7 +505,7 @@ statistics_doStatisticMinMax ($$$$$$)
# Get reading, cut out first number without units
my $value = $dev->{READINGS}{$readingName}{VAL};
$value =~ s/^[\D]*(-?[\d.]*).*/$1/eg;
$value =~ s/(-?[\d.]*).*/$1/e;
statistics_Log $hash, 4, "Calculating min/avg/max statistics for '".$dev->{NAME}.":$readingName = $value'";
# statistics_doStatisticMinMaxSingle: $hash, $readingName, $value, $saveLast, decPlaces
@ -606,7 +606,7 @@ statistics_doStatisticTendency ($$$$)
# Get reading, cut out first number without units
my $value = $dev->{READINGS}{$readingName}{VAL};
$value =~ s/^[\D]*(-?[\d.]*).*/$1/eg;
$value =~ s/([-\d.]*).*/$1/e;
statistics_Log $hash, 4, "Calculating hourly tendency statistics for '".$dev->{NAME}.":$readingName = $value'";
my $statReadingName = $hash->{PREFIX} . ucfirst($readingName) . "Tendency";
@ -672,7 +672,7 @@ statistics_doStatisticDelta ($$$$)
# Get reading, extract first number without units
my $value = $dev->{READINGS}{$readingName}{VAL};
$value =~ s/^[\D]*(-?[\d.]*).*/$1/eg;
$value =~ s/([-\d.]*).*/$1/e;
statistics_Log $hash, 4, "Calculating delta statistics for '".$dev->{NAME}.":$readingName = $value'";
my $hiddenReadingName = ".".$dev->{NAME}.":".$readingName;