mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
76_Solarforcast: contrib 0.83.3
git-svn-id: https://svn.fhem.de/fhem/trunk@28005 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
edd50df2f4
commit
b8541ee6a8
@ -142,6 +142,8 @@ BEGIN {
|
||||
|
||||
# Versions History intern
|
||||
my %vNotesIntern = (
|
||||
"0.83.3" => "28.09.2023 fix Illegal division by zero, Forum: https://forum.fhem.de/index.php?msg=1288032 ".
|
||||
"delete AllPVforecastsToEvent after event generation ",
|
||||
"0.83.2" => "26.09.2023 setter reset consumption ",
|
||||
"0.83.1" => "26.09.2023 change currentRadiationDev to currentRadiationAPI, new attr ctrlAIdataStorageDuration ".
|
||||
"new elements todayConsumptionForecast, conForecastTillNextSunrise for attr ctrlStatisticReadings ".
|
||||
@ -4706,6 +4708,7 @@ sub centralTask {
|
||||
_transferWeatherValues ($centpars); # Wetterwerte übertragen
|
||||
|
||||
createReadingsFromArray ($hash, \@da, $evt); # Readings erzeugen
|
||||
readingsDelete ($hash, 'AllPVforecastsToEvent');
|
||||
|
||||
_getRoofTopData ($centpars); # Strahlungswerte/Forecast-Werte in solcastapi-Hash erstellen
|
||||
_transferAPIRadiationValues ($centpars); # Raw Erzeugungswerte aus solcastapi-Hash übertragen und Forecast mit/ohne Korrektur erstellen
|
||||
@ -6175,8 +6178,9 @@ sub _createSummaries {
|
||||
|
||||
my $selfconsumptionrate = 0;
|
||||
my $autarkyrate = 0;
|
||||
my $divi = $selfconsumption + $batout + $gcon;
|
||||
$selfconsumptionrate = sprintf "%.0f", $selfconsumption / $pvgen * 100 if($pvgen * 1 > 0);
|
||||
$autarkyrate = sprintf "%.0f", ($selfconsumption + $batout) / ($selfconsumption + $batout + $gcon) * 100 if($selfconsumption + $batout);
|
||||
$autarkyrate = sprintf "%.0f", ($selfconsumption + $batout) / $divi * 100 if($divi); # vermeide Illegal division by zero
|
||||
|
||||
$data{$type}{$name}{current}{consumption} = $consumption;
|
||||
$data{$type}{$name}{current}{selfconsumption} = $selfconsumption;
|
||||
|
Loading…
x
Reference in New Issue
Block a user