2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-29 23:47:10 +00:00

statistics: bugfix special period

git-svn-id: https://svn.fhem.de/fhem/trunk@11116 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
grompo 2016-03-23 16:58:32 +00:00
parent 842f21d7d9
commit f04cbbbacd

View File

@ -3,7 +3,7 @@
# #
# 98_statistic.pm # 98_statistic.pm
# #
# (c) 2014 Torsten Poitzsch < torsten . poitzsch at gmx . de > # (c) 2014-2016 tupol http://forum.fhem.de/index.php?action=profile;u=5432
# #
# This module computes statistic data of and for readings of other modules # This module computes statistic data of and for readings of other modules
# #
@ -829,7 +829,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 != $specialPeriod) { $result .= " (".$#hidden.".hours)"; } $result .= " (".$#hidden.".hours)" if $#hidden != $specialPeriod-1;
readingsBulkUpdate($dev, $statReadingName, $result, 1); readingsBulkUpdate($dev, $statReadingName, $result, 1);
# Store hidden stack # Store hidden stack