mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-26 04:24:53 +00:00
76_SolarForecast: Illegal division by zero
git-svn-id: https://svn.fhem.de/fhem/trunk@28954 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c9bed69aef
commit
416e145b23
fhem
@ -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: Illegal division by zero
|
||||
- bufgix: 32_withings: improved token refresh timing
|
||||
- change: 38_netatmo: improved disconnect handling on auth failure
|
||||
- change: 76_SolarForecast: set inverterStrings to attr setupInverterStrings
|
||||
|
@ -157,6 +157,7 @@ BEGIN {
|
||||
|
||||
# Versions History intern
|
||||
my %vNotesIntern = (
|
||||
"1.25.1" => "08.06.2024 Illegal division by zero Forum:https://forum.fhem.de/index.php?msg=1314730 ",
|
||||
"1.25.0" => "05.06.2024 transformed setter inverterStrings to attr setupInverterStrings, calcTodayPVdeviation: fix continuously calc again ",
|
||||
"1.24.0" => "03.06.2024 transformed setter currentInverterDev to attr setupInverterDev, calcTodayPVdeviation: fix continuously calc ",
|
||||
"1.23.0" => "02.06.2024 transformed setter currentBatteryDev to attr setupBatteryDev, _transferInverterValues: change output for DEBUG ".
|
||||
@ -10624,6 +10625,8 @@ sub calcTodayPVdeviation {
|
||||
}
|
||||
else {
|
||||
my $pvfcd = ReadingsNum ($name, 'RestOfDayPVforecast', 0) - $pvfc; # PV Prognose bis jetzt
|
||||
return if(!$pvfcd); # Illegal division by zero verhindern
|
||||
|
||||
$dp = sprintf "%.2f", (100 - (100 * $pvre / abs $pvfcd)); # V 1.25.0
|
||||
}
|
||||
|
||||
|
@ -157,6 +157,7 @@ BEGIN {
|
||||
|
||||
# Versions History intern
|
||||
my %vNotesIntern = (
|
||||
"1.25.1" => "08.06.2024 Illegal division by zero Forum:https://forum.fhem.de/index.php?msg=1314730 ",
|
||||
"1.25.0" => "05.06.2024 transformed setter inverterStrings to attr setupInverterStrings, calcTodayPVdeviation: fix continuously calc again ",
|
||||
"1.24.0" => "03.06.2024 transformed setter currentInverterDev to attr setupInverterDev, calcTodayPVdeviation: fix continuously calc ",
|
||||
"1.23.0" => "02.06.2024 transformed setter currentBatteryDev to attr setupBatteryDev, _transferInverterValues: change output for DEBUG ".
|
||||
@ -10624,6 +10625,8 @@ sub calcTodayPVdeviation {
|
||||
}
|
||||
else {
|
||||
my $pvfcd = ReadingsNum ($name, 'RestOfDayPVforecast', 0) - $pvfc; # PV Prognose bis jetzt
|
||||
return if(!$pvfcd); # Illegal division by zero verhindern
|
||||
|
||||
$dp = sprintf "%.2f", (100 - (100 * $pvre / abs $pvfcd)); # V 1.25.0
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user