2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

76_SolarForecast: minor change calculation Today PV deviation

git-svn-id: https://svn.fhem.de/fhem/trunk@28799 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2024-04-16 19:47:11 +00:00
parent 965b311a9e
commit ae3094b7a8
2 changed files with 5 additions and 4 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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 # 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: 49_SSCam: change internal logic for sending data and their Saving
- change: 10_SOMFY.pm: Signalduino modif and doc cleanup - msg1298875 - change: 10_SOMFY.pm: Signalduino modif and doc cleanup - msg1298875
- feature: 74_AutomowerConnect.pm: reduce spikes in border region after a hull - feature: 74_AutomowerConnect.pm: reduce spikes in border region after a hull

View File

@ -158,6 +158,7 @@ BEGIN {
# Versions History intern # Versions History intern
my %vNotesIntern = ( 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.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 ". "1.17.6" => "07.04.2024 new sub writeToHistory with many internal changes in pvHistory write process ".
"_transferInverterValues: react on inverter etotal behavior ", "_transferInverterValues: react on inverter etotal behavior ",
@ -10205,13 +10206,12 @@ sub calcTodayPVdeviation {
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($t < $sstime);
my $diff = $pvfc - $pvre; $dp = sprintf "%.2f", (100 - (100 * $pvfc / $pvre));
$dp = sprintf "%.2f" , (100 * $diff / $pvre);
} }
else { else {
my $rodfc = ReadingsNum ($name, 'RestOfDayPVforecast', 0); my $rodfc = ReadingsNum ($name, 'RestOfDayPVforecast', 0);
my $dayfc = $pvre + $rodfc; # laufende Tagesprognose aus PVreal + Prognose Resttag my $fcun = $pvfc - $rodfc; # laufende PV Prognose aus Tagesprognose - Prognose Resttag
$dp = sprintf "%.2f", (100 * ($pvfc - $dayfc) / $dayfc); $dp = sprintf "%.2f", (100 - (100 * $pvre / $fcun));
} }
$data{$type}{$name}{circular}{99}{tdayDvtn} = $dp; $data{$type}{$name}{circular}{99}{tdayDvtn} = $dp;