mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
76_SolarForecast.pm: contrib 0.39.0
git-svn-id: https://svn.fhem.de/fhem/trunk@24325 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b3f5e9d052
commit
2382cb5380
@ -118,7 +118,7 @@ BEGIN {
|
|||||||
|
|
||||||
# Versions History intern
|
# Versions History intern
|
||||||
my %vNotesIntern = (
|
my %vNotesIntern = (
|
||||||
"0.39.0" => "24.04.2021 new attr sameWeekdaysForConsfc ",
|
"0.39.0" => "24.04.2021 new attr sameWeekdaysForConsfc, readings Current_SelfConsumption, Current_SelfConsumptionQuote ",
|
||||||
"0.38.3" => "21.04.2021 minor fixes in sub calcVariance, Traffic light indicator for prediction quality, some more fixes ",
|
"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.2" => "20.04.2021 fix _estConsumptionForecast, add consumption values to graphic ",
|
||||||
"0.38.1" => "19.04.2021 bug fixing ",
|
"0.38.1" => "19.04.2021 bug fixing ",
|
||||||
@ -2415,9 +2415,16 @@ sub _calcSummaries {
|
|||||||
my $batout = CurrentVal ($hash, "powerbatout", 0); # aktuelle Batterieentladung
|
my $batout = CurrentVal ($hash, "powerbatout", 0); # aktuelle Batterieentladung
|
||||||
|
|
||||||
my $consumption = int ($pvgen - $gfeedin + $gcon - $batin + $batout);
|
my $consumption = int ($pvgen - $gfeedin + $gcon - $batin + $batout);
|
||||||
$data{$type}{$name}{current}{consumption} = $consumption;
|
my $selfconsumption = int ($pvgen - $gfeedin);
|
||||||
|
my $selfconsumptionquote = sprintf("%.0f", $selfconsumption / $pvgen * 100);
|
||||||
|
|
||||||
|
$data{$type}{$name}{current}{consumption} = $consumption;
|
||||||
|
$data{$type}{$name}{current}{selfconsumption} = $selfconsumption;
|
||||||
|
$data{$type}{$name}{current}{selfconsumptionquote} = $selfconsumptionquote;
|
||||||
|
|
||||||
push @$daref, "Current_Consumption<>". $consumption. " W";
|
push @$daref, "Current_Consumption<>". $consumption. " W";
|
||||||
|
push @$daref, "Current_SelfConsumption<>". $selfconsumption. " W";
|
||||||
|
push @$daref, "Current_SelfConsumptionQuote<>".$selfconsumptionquote. " %";
|
||||||
|
|
||||||
push @$daref, "NextHours_Sum01_PVforecast<>". (int $next1HoursSum->{PV})." Wh";
|
push @$daref, "NextHours_Sum01_PVforecast<>". (int $next1HoursSum->{PV})." Wh";
|
||||||
push @$daref, "NextHours_Sum02_PVforecast<>". (int $next2HoursSum->{PV})." Wh";
|
push @$daref, "NextHours_Sum02_PVforecast<>". (int $next2HoursSum->{PV})." Wh";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user