mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-25 09:55:38 +00:00
76_SolarForecast: set currentBatteryDev to attr setupBatteryDev
git-svn-id: https://svn.fhem.de/fhem/trunk@28937 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2ab6ad5029
commit
b6e0977901
@ -158,7 +158,8 @@ BEGIN {
|
|||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
"1.23.0" => "02.06.2024 transformed setter currentBatteryDev to attr setupBatteryDev, _transferInverterValues: change output for DEBUG ".
|
"1.23.0" => "02.06.2024 transformed setter currentBatteryDev to attr setupBatteryDev, _transferInverterValues: change output for DEBUG ".
|
||||||
"new key attrInvChangedTs in circular, prepare transformation of currentInverterDev ",
|
"new key attrInvChangedTs in circular, prepare transformation of currentInverterDev ".
|
||||||
|
"calcTodayPVdeviation: fix daily calc ",
|
||||||
"1.22.0" => "01.06.2024 transformed setter currentMeterDev to attr setupMeterDev, plantConfiguration: setModel after restore ".
|
"1.22.0" => "01.06.2024 transformed setter currentMeterDev to attr setupMeterDev, plantConfiguration: setModel after restore ".
|
||||||
"delete reset currentMeterSet ",
|
"delete reset currentMeterSet ",
|
||||||
"1.21.5" => "30.05.2024 listDataPool: list current can operate three hash levels, first preparation for remote objects ",
|
"1.21.5" => "30.05.2024 listDataPool: list current can operate three hash levels, first preparation for remote objects ",
|
||||||
@ -10617,14 +10618,14 @@ sub calcTodayPVdeviation {
|
|||||||
|
|
||||||
if (AttrVal ($name, 'ctrlGenPVdeviation', 'daily') eq 'daily') {
|
if (AttrVal ($name, 'ctrlGenPVdeviation', 'daily') eq 'daily') {
|
||||||
my $sstime = timestringToTimestamp ($date.' '.ReadingsVal ($name, "Today_SunSet", '22:00').':00');
|
my $sstime = timestringToTimestamp ($date.' '.ReadingsVal ($name, "Today_SunSet", '22:00').':00');
|
||||||
return if($t < $sstime);
|
return if(!$pvfc || $t < $sstime); # V 1.23.0
|
||||||
|
|
||||||
$dp = sprintf "%.2f", (100 - (100 * $pvfc / $pvre));
|
$dp = sprintf "%.2f", (100 - (100 * $pvre / $pvfc)); # V 1.23.0
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
my $rodfc = ReadingsNum ($name, 'RestOfDayPVforecast', 0); # PV Forecast für den Rest des Tages
|
my $rodfc = ReadingsNum ($name, 'RestOfDayPVforecast', 0); # PV Forecast für den Rest des Tages
|
||||||
my $cufc = $pvfc - $rodfc; # laufende PV Prognose aus Tagesprognose - Prognose Resttag
|
my $cufc = $pvfc - $rodfc; # laufende PV Prognose aus Tagesprognose - Prognose Resttag
|
||||||
return if(!$cufc); # Illegal division by zero verhindern Forum:
|
return if(!$cufc); # Illegal division by zero verhindern
|
||||||
$dp = sprintf "%.2f", (100 - (100 * $pvre / $cufc));
|
$dp = sprintf "%.2f", (100 - (100 * $pvre / $cufc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user