From ca2d942eb9ebb1099579ee4aed6ef90e042e8ba9 Mon Sep 17 00:00:00 2001 From: grompo <> Date: Sun, 13 Mar 2016 16:41:38 +0000 Subject: [PATCH] statistics: bugfix durationReadings git-svn-id: https://svn.fhem.de/fhem/trunk@11056 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_statistics.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/98_statistics.pm b/fhem/FHEM/98_statistics.pm index 4621f22eb..a62aabc0a 100644 --- a/fhem/FHEM/98_statistics.pm +++ b/fhem/FHEM/98_statistics.pm @@ -922,8 +922,8 @@ sub statistics_doStatisticDurationSingle ($$$$$$) $saveLast = 0; $lastState = $state; $hidden{"(since:"} = strftime ("%Y-%m-%d_%H:%M:%S)",localtime() ); - $hidden{$state} = 0; - $hidden{$state."_Count"} = 1; + $hidden{$state.":"} = 0; + $hidden{$state."_Count:"} = 1; } # Do calculations if hidden reading exists else { @@ -955,10 +955,10 @@ sub statistics_doStatisticDurationSingle ($$$$$$) #Store current value for single readings $stat{$key} = $hidden{$key}; # Reset hidden reading if period change - if ($saveLast && $key ne $state."_Count") { + if ($saveLast && $key ne $state."_Count:") { delete $hidden{$key}; } - elsif ($saveLast && $key eq $state."_Count") { + elsif ($saveLast && $key eq $state."_Count:") { $hidden{$key} = 1; } }