76_SolarForecast.pm: contrib 0.10.0

git-svn-id: https://svn.fhem.de/fhem/trunk@23952 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DS_Starter
2021-03-13 17:49:45 +00:00
parent 1827fffd30
commit 1f4cdd6872

View File

@@ -2691,17 +2691,17 @@ sub setPVhistory {
my $paref = shift;
my $hash = $paref->{hash};
my $name = $paref->{name};
my $t = $paref->{t}; # aktuelle Unix-Zeit
my $t = $paref->{t}; # aktuelle Unix-Zeit
my $chour = $paref->{chour};
my $nhour = $paref->{nhour};
my $ethishour = $paref->{ethishour} // 0;
my $calcpv = $paref->{calcpv} // 0;
my $type = $hash->{TYPE};
my $day = strftime "%d", localtime($t); # aktueller Tag
my $day = strftime "%d", localtime($t); # aktueller Tag
$data{$type}{$name}{pvhist}{$day}{$nhour}{pvrl} = $ethishour if(defined $ethishour); # realer Energieertrag
$data{$type}{$name}{pvhist}{$day}{$chour}{pvfc} = $calcpv if(defined $calcpv); # prognostizierter Energieertrag
$data{$type}{$name}{pvhist}{$day}{$nhour}{pvrl} = $ethishour if($nhour && defined $ethishour); # realer Energieertrag
$data{$type}{$name}{pvhist}{$day}{$chour}{pvfc} = $calcpv if($chour && defined $calcpv); # prognostizierter Energieertrag
Log3 ($name, 5, "$name - set PV History hour $chour -> real: $ethishour, forecast: $calcpv");