statistics: bugfix durationReadings
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@11056 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -922,8 +922,8 @@ sub statistics_doStatisticDurationSingle ($$$$$$)
|
|||||||
$saveLast = 0;
|
$saveLast = 0;
|
||||||
$lastState = $state;
|
$lastState = $state;
|
||||||
$hidden{"(since:"} = strftime ("%Y-%m-%d_%H:%M:%S)",localtime() );
|
$hidden{"(since:"} = strftime ("%Y-%m-%d_%H:%M:%S)",localtime() );
|
||||||
$hidden{$state} = 0;
|
$hidden{$state.":"} = 0;
|
||||||
$hidden{$state."_Count"} = 1;
|
$hidden{$state."_Count:"} = 1;
|
||||||
}
|
}
|
||||||
# Do calculations if hidden reading exists
|
# Do calculations if hidden reading exists
|
||||||
else {
|
else {
|
||||||
@@ -955,10 +955,10 @@ sub statistics_doStatisticDurationSingle ($$$$$$)
|
|||||||
#Store current value for single readings
|
#Store current value for single readings
|
||||||
$stat{$key} = $hidden{$key};
|
$stat{$key} = $hidden{$key};
|
||||||
# Reset hidden reading if period change
|
# Reset hidden reading if period change
|
||||||
if ($saveLast && $key ne $state."_Count") {
|
if ($saveLast && $key ne $state."_Count:") {
|
||||||
delete $hidden{$key};
|
delete $hidden{$key};
|
||||||
}
|
}
|
||||||
elsif ($saveLast && $key eq $state."_Count") {
|
elsif ($saveLast && $key eq $state."_Count:") {
|
||||||
$hidden{$key} = 1;
|
$hidden{$key} = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user