2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

93_DbRep: contrib 8.50.0

git-svn-id: https://svn.fhem.de/fhem/trunk@26318 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2022-08-13 06:31:36 +00:00
parent 6466eaf013
commit 5aacbfc515

View File

@ -9359,8 +9359,7 @@ sub _DbRep_rl_updateHour {
return $err if ($err);
}
my ($max, $params);
my $sum = 0;
my $params;
my $i = 0;
my $k = 1;
my $th = _DbRep_rl_logThreshold ($c);
@ -9400,12 +9399,13 @@ sub _DbRep_rl_updateHour {
$i++;
my $sum = 0;
for my $val (@{$hourHash->{$hourKey}->[4]}) {
$sum += $val;
}
my $value = sprintf "%.${ndp}f", $sum / scalar @{$hourHash->{$hourKey}->[4]};
$sum = 0;
$paref->{logtxt} = "(hourly-$mstr) updating";
$paref->{newvalue} = $value;
@ -9429,6 +9429,8 @@ sub _DbRep_rl_updateHour {
$i++;
my $max;
for my $val (@{$hourHash->{$hourKey}->[4]}) {
if (!defined $max) {
$max = $val;
@ -9439,7 +9441,6 @@ sub _DbRep_rl_updateHour {
}
my $value = sprintf "%.${ndp}f", $max;
undef $max;
$paref->{logtxt} = "(hourly-$mstr) updating";
$paref->{newvalue} = $value;