From b47fb0e93034dc2a8a4b46afacf1e5c6378e3714 Mon Sep 17 00:00:00 2001 From: grompo <> Date: Fri, 25 Mar 2016 19:57:11 +0000 Subject: [PATCH] statistics: docu git-svn-id: https://svn.fhem.de/fhem/trunk@11125 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_statistics.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fhem/FHEM/98_statistics.pm b/fhem/FHEM/98_statistics.pm index 4fdaef598..236779445 100644 --- a/fhem/FHEM/98_statistics.pm +++ b/fhem/FHEM/98_statistics.pm @@ -890,11 +890,11 @@ sub statistics_doStatisticSpecialPeriod2 ($$$$$$) $result += $_; $counterHidden++; if ( $counterHidden == $periods[$counterPeriods] ) { - $counterPeriods++; - my $rName = $statReadingName.$counterHidden; + my $rName = $statReadingName.$periods[$counterPeriods]; my $rValue = sprintf "%.".$decPlaces."f", $result; statistics_Log $hash, 4, "Set '$rName = $rValue'"; readingsBulkUpdate($dev, $rName, $rValue, 1); + $counterPeriods++; } } @@ -1280,17 +1280,17 @@ sub statistics_UpdateDevReading($$$$)
Creates for the given delta reading additional singular readings of the given numbers of a period (Hour, Day, Month)
- Regular expressions cannot be used. More readings and/or period can be added but have to be separated by comma (without spaces). + Regular expressions cannot be used. Additional readings or additional periods can be defined but have to be separated by a comma (without spaces).
Example:
- attr Statistik specialDeltaPeriod Wettersensor:rain:Hour:48:72:96 + attr Statistik specialDeltaPeriod Wettersensor:rain:Hour:06:72:96
- This will add 3 additional readings for the rain of the last 48, 72, 96 hours. + This will create 3 additional readings for the rain of the last 6, 72 and 96 hours.
attr Statistik specialDeltaPeriod Wettersensor:rain:Hour:48,Wettersensor:rain:Day:30,EZaehler:energy:Month:6:12
- This will add 4 additional readings for the rain of the last 48 hours and the last 30 Days and the energy consumtion of the last 6 and 12 months. + This will create 4 additional readings for the rain of the last 48 hours and the last 30 Days and the energy consumtion of the last 6 and 12 months.

  • specialDeltaPeriodHours @@ -1452,9 +1452,9 @@ sub statistics_UpdateDevReading($$$$)
    Beispiel:
    - attr Statistik specialDeltaPeriod Wettersensor:rain:Hour:48:72:96 + attr Statistik specialDeltaPeriod Wettersensor:rain:Hour:06:72:96
    - Dies erzeugt 3 zusätzliche Werte für die Regenmenge in den letzten 48, 72, 96 Stunden. + Dies erzeugt 3 zusätzliche Werte für die Regenmenge in den letzten 6, 72, 96 Stunden.
    attr Statistik specialDeltaPeriod Wettersensor:rain:Hour:48,Wettersensor:rain:Day:30,EZaehler:energy:Month:6:12