From 2d1c865a46aa04a2e6445b2e8ef4c8525f840b7c Mon Sep 17 00:00:00 2001 From: tpoitzsch <> Date: Thu, 11 Dec 2014 07:13:14 +0000 Subject: [PATCH] statistics: bugfix git-svn-id: https://svn.fhem.de/fhem/trunk@7186 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_statistics.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fhem/FHEM/98_statistics.pm b/fhem/FHEM/98_statistics.pm index 866f83ea7..778920550 100644 --- a/fhem/FHEM/98_statistics.pm +++ b/fhem/FHEM/98_statistics.pm @@ -363,7 +363,7 @@ sub statistics_DoStatisticsAll($$) my $regexp = $hash->{DEV_REGEXP}; foreach my $devName (sort keys %defs) { if ($devName ne $name && $devName =~ m/^($regexp)$/) { - statistics_Log $hash,4,"Doing statistics (type $periodSwitch) for device '$devName'"; + statistics_Log $hash,4,"Doing statistics (period $periodSwitch) for device '$devName'"; statistics_DoStatistics($hash, $defs{$devName}, $periodSwitch); } } @@ -409,9 +409,10 @@ sub statistics_DoStatistics($$$) while (my ($aName, $statType) = each (%addedReadingsAttr) ) { my @addedReadings = split /,/, AttrVal($hashName, $aName, ""); - foreach( keys @addedReadings ) + foreach( @addedReadings ) { - $statReadings{$_} = $statType; + statistics_Log $hash, 5, "Assigned reading '$_' from attribute '$aName' to statistic type $statType."; + $statReadings{$_} = $statType; } }