diff --git a/fhem/CHANGED b/fhem/CHANGED index fcaa6390d..2e47aa593 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 + - bugfix: 76_SolarForecast: negative SoC forecast when using optPower - feature: 76_SolarForecast: Version 1.58.6 - bugfix: 72_FRITZBOX: Fehler bei rename von Devices - bugfix: 76_SolarForecast: opt load if battery load control is deactivated diff --git a/fhem/FHEM/76_SolarForecast.pm b/fhem/FHEM/76_SolarForecast.pm index ed68cf896..c419e1440 100644 --- a/fhem/FHEM/76_SolarForecast.pm +++ b/fhem/FHEM/76_SolarForecast.pm @@ -160,6 +160,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.58.7" => "05.10.2025 fix negative SoC forecast when using optPower Forum: https://forum.fhem.de/index.php?msg=1348954 ", "1.58.6" => "03.10.2025 __batChargeMgmt code changed, new sub ___batChargeSaveResults, remove reading Battery_ChargeRecommended_XX ". "_calcReadingsTomorrowPVFc: bugfix generating readings of tomorrow ". "__batChargeOptTargetPower: complete rework, Attr ctrlBatSocManagementXX new keys 'loadStrategy', 'weightOwnUse' ". @@ -12049,7 +12050,7 @@ sub __batChargeOptTargetPower { $hsurp->{$hod}{$sbn}{pneedmin} = $bpinmax; $runwh += $hsurp->{$hod}{speff} / $befficiency; # um Verbrauch reduzieren - $hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", $runwh; + $hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", max (0, $runwh); if ($nhr eq '00') { $otp->{$sbn}{target} = $csocwh <= $lowSocwh ? $bpinreduced : $bpinmax; diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 269f5f909..c419e1440 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -160,6 +160,7 @@ BEGIN { # Versions History intern my %vNotesIntern = ( + "1.58.7" => "05.10.2025 fix negative SoC forecast when using optPower Forum: https://forum.fhem.de/index.php?msg=1348954 ", "1.58.6" => "03.10.2025 __batChargeMgmt code changed, new sub ___batChargeSaveResults, remove reading Battery_ChargeRecommended_XX ". "_calcReadingsTomorrowPVFc: bugfix generating readings of tomorrow ". "__batChargeOptTargetPower: complete rework, Attr ctrlBatSocManagementXX new keys 'loadStrategy', 'weightOwnUse' ". @@ -12049,7 +12050,7 @@ sub __batChargeOptTargetPower { $hsurp->{$hod}{$sbn}{pneedmin} = $bpinmax; $runwh += $hsurp->{$hod}{speff} / $befficiency; # um Verbrauch reduzieren - $hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", $runwh; + $hsurp->{$hod}{$sbn}{fcendwh} = sprintf "%.0f", max (0, $runwh); if ($nhr eq '00') { $otp->{$sbn}{target} = $csocwh <= $lowSocwh ? $bpinreduced : $bpinmax; @@ -27849,7 +27850,7 @@ to ensure that the system configuration is correct.