diff --git a/fhem/CHANGED b/fhem/CHANGED index 7a4acfe72..c7bfc906c 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it + - change: 76_SolarForecast: minor change calculation Today PV deviation - change: 49_SSCam: change internal logic for sending data and their Saving - change: 10_SOMFY.pm: Signalduino modif and doc cleanup - msg1298875 - feature: 74_AutomowerConnect.pm: reduce spikes in border region after a hull diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index dd1243de2..fc0968a6c 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -158,6 +158,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.17.8" => "16.04.2024 calcTodayPVdeviation: change of calculation ", "1.17.7" => "09.04.2024 export pvHistory to CSV, making attr affectMaxDayVariance obsolete ", "1.17.6" => "07.04.2024 new sub writeToHistory with many internal changes in pvHistory write process ". "_transferInverterValues: react on inverter etotal behavior ", @@ -10205,13 +10206,12 @@ sub calcTodayPVdeviation { my $sstime = timestringToTimestamp ($date.' '.ReadingsVal ($name, "Today_SunSet", '22:00').':00'); return if($t < $sstime); - my $diff = $pvfc - $pvre; - $dp = sprintf "%.2f" , (100 * $diff / $pvre); + $dp = sprintf "%.2f", (100 - (100 * $pvfc / $pvre)); } else { my $rodfc = ReadingsNum ($name, 'RestOfDayPVforecast', 0); - my $dayfc = $pvre + $rodfc; # laufende Tagesprognose aus PVreal + Prognose Resttag - $dp = sprintf "%.2f", (100 * ($pvfc - $dayfc) / $dayfc); + my $fcun = $pvfc - $rodfc; # laufende PV Prognose aus Tagesprognose - Prognose Resttag + $dp = sprintf "%.2f", (100 - (100 * $pvre / $fcun)); } $data{$type}{$name}{circular}{99}{tdayDvtn} = $dp;