From 5089b69e9e2074f97a26b13f62016fdb7dd130e6 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Thu, 10 Aug 2023 10:35:44 +0000 Subject: [PATCH] 76_Solarforcast: contrib 0.80.19 git-svn-id: https://svn.fhem.de/fhem/trunk@27831 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/DS_Starter/76_SolarForecast.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 29580fa98..6c4e56058 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -1,5 +1,5 @@ ######################################################################################################################## -# $Id: 76_SolarForecast.pm 21735 2023-08-07 23:53:24Z DS_Starter $ +# $Id: 76_SolarForecast.pm 21735 2023-08-10 23:53:24Z DS_Starter $ ######################################################################################################################### # 76_SolarForecast.pm # @@ -136,6 +136,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "0.80.19"=> "10.08.2023 fix Illegal division by zero, Forum: https://forum.fhem.de/index.php?msg=1283836 ", "0.80.18"=> "07.08.2023 change calculation of todayDoneAPIcalls in ___setSolCastAPIcallKeyData, add \$lagtime ". "Forum: https://forum.fhem.de/index.php?msg=1283487 ", "0.80.17"=> "05.08.2023 change sequence of _createSummaries in centralTask, ComRef edited ", @@ -3842,6 +3843,7 @@ sub centralTask { # deleteReadingspec ($hash, "pvSolCastPercentile_${n}.*"); #} #Log3 ($name, 1, "$name - all Hash Elemente:\n".Dumper $hash); + #Log3 ($name, 1, "$name - all nexthours Elemente:\n".Dumper $data{$type}{$name}{nexthours}); ############################################################################################ if($init_done == 1) { @@ -4601,6 +4603,8 @@ sub ___readCandQ { my $hc = $pvcorr; # Voreinstellung RAW-Korrekturfaktor my $hq = '-'; # keine Qualität definiert + delete $data{$type}{$name}{nexthours}{"NextHour".sprintf("%02d",$num)}{cloudrange}; + if ($acu =~ /on_complex/xs) { # Autokorrektur complex soll genutzt werden my $range = calcRange ($cc); # Range errechnen ($hc, $hq) = CircularAutokorrVal ($hash, sprintf("%02d",$fh1), $range, undef); # Korrekturfaktor/Qualität der Stunde des Tages (complex) @@ -5537,7 +5541,7 @@ sub _manageConsumerData { } if ($dnum) { - if($consumerco) { + if($consumerco && $runhours) { $data{$type}{$name}{consumers}{$c}{avgenergy} = sprintf "%.2f", ($consumerco/$runhours); # Durchschnittsverbrauch pro Stunde in Wh } else {