2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-20 01:06:04 +00:00

76_SolarForecast.pm: contrib 0.39.0

git-svn-id: https://svn.fhem.de/fhem/trunk@24326 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2021-04-24 18:05:34 +00:00
parent 2382cb5380
commit a0375b578e

View File

@ -118,7 +118,8 @@ BEGIN {
# Versions History intern
my %vNotesIntern = (
"0.39.0" => "24.04.2021 new attr sameWeekdaysForConsfc, readings Current_SelfConsumption, Current_SelfConsumptionQuote ",
"0.39.0" => "24.04.2021 new attr sameWeekdaysForConsfc, readings Current_SelfConsumption, Current_SelfConsumptionRate, ".
"Current_AutarkyRate ",
"0.38.3" => "21.04.2021 minor fixes in sub calcVariance, Traffic light indicator for prediction quality, some more fixes ",
"0.38.2" => "20.04.2021 fix _estConsumptionForecast, add consumption values to graphic ",
"0.38.1" => "19.04.2021 bug fixing ",
@ -2416,15 +2417,18 @@ sub _calcSummaries {
my $consumption = int ($pvgen - $gfeedin + $gcon - $batin + $batout);
my $selfconsumption = int ($pvgen - $gfeedin);
my $selfconsumptionquote = sprintf("%.0f", $selfconsumption / $pvgen * 100);
my $selfconsumptionrate = sprintf("%.0f", $selfconsumption / $pvgen * 100);
my $autarkyrate = sprintf("%.0f", $selfconsumption / ($selfconsumption + $gcon) * 100);
$data{$type}{$name}{current}{consumption} = $consumption;
$data{$type}{$name}{current}{selfconsumption} = $selfconsumption;
$data{$type}{$name}{current}{selfconsumptionquote} = $selfconsumptionquote;
$data{$type}{$name}{current}{consumption} = $consumption;
$data{$type}{$name}{current}{selfconsumption} = $selfconsumption;
$data{$type}{$name}{current}{selfconsumptionrate} = $selfconsumptionrate;
$data{$type}{$name}{current}{autarkyrate} = $autarkyrate;
push @$daref, "Current_Consumption<>". $consumption. " W";
push @$daref, "Current_SelfConsumption<>". $selfconsumption. " W";
push @$daref, "Current_SelfConsumptionQuote<>".$selfconsumptionquote. " %";
push @$daref, "Current_SelfConsumptionRate<>". $selfconsumptionrate. " %";
push @$daref, "Current_AutarkyRate<>". $autarkyrate. " %";
push @$daref, "NextHours_Sum01_PVforecast<>". (int $next1HoursSum->{PV})." Wh";
push @$daref, "NextHours_Sum02_PVforecast<>". (int $next2HoursSum->{PV})." Wh";