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

76_SolarForecast.pm: contrib 0.11.0

git-svn-id: https://svn.fhem.de/fhem/trunk@23969 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2021-03-14 15:46:03 +00:00
parent 2f2892494c
commit cacc29cdae

View File

@ -2790,15 +2790,30 @@ sub setPVhistory {
if($histname eq "pvrl") { # realer Energieertrag
$val = $ethishour;
$data{$type}{$name}{pvhist}{$day}{$nhour}{pvrl} = $ethishour;
$data{$type}{$name}{pvhist}{$day}{$nhour}{pvrl} = $ethishour;
my $pvrlsum = 0;
for my $k (keys %{$data{$type}{$name}{pvhist}{$day}}) {
next if($k eq "99");
$pvrlsum += $data{$type}{$name}{pvhist}{$day}{$k}{pvrl} // 0;
}
$data{$type}{$name}{pvhist}{$day}{99}{pvrl} = $pvrlsum;
}
if($histname eq "pvfc") { # prognostizierter Energieertrag
$val = $calcpv;
$data{$type}{$name}{pvhist}{$day}{$nhour}{pvfc} = $calcpv;
$data{$type}{$name}{pvhist}{$day}{$nhour}{pvfc} = $calcpv;
my $pvfcsum = 0;
for my $k (keys %{$data{$type}{$name}{pvhist}{$day}}) {
next if($k eq "99");
$pvfcsum += $data{$type}{$name}{pvhist}{$day}{$k}{pvfc} // 0;
}
$data{$type}{$name}{pvhist}{$day}{99}{pvfc} = $pvfcsum;
}
Log3 ($name, 5, "$name - set PV History hour: $nhour, hash: $histname, val: $val");
delete $data{$type}{$name}{pvhist}{$day}{summary};
return;
}