mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
76_SolarForecast.pm: contrib 0.37.0
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24264 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0251a290dd
commit
a79639f97c
@ -1008,6 +1008,7 @@ sub _setreset { ## no critic "not used"
|
|||||||
delete $hash->{HELPER}{INITCONTOTAL};
|
delete $hash->{HELPER}{INITCONTOTAL};
|
||||||
delete $hash->{HELPER}{INITFEEDTOTAL};
|
delete $hash->{HELPER}{INITFEEDTOTAL};
|
||||||
delete $data{$type}{$name}{current}{gridconsumption};
|
delete $data{$type}{$name}{current}{gridconsumption};
|
||||||
|
delete $data{$type}{$name}{current}{tomorrowconsumption};
|
||||||
delete $data{$type}{$name}{current}{gridfeedin};
|
delete $data{$type}{$name}{current}{gridfeedin};
|
||||||
delete $data{$type}{$name}{current}{consumption};
|
delete $data{$type}{$name}{current}{consumption};
|
||||||
}
|
}
|
||||||
@ -2277,7 +2278,7 @@ sub _calcSummaries {
|
|||||||
limitArray ($data{$type}{$name}{current}{h4fcslidereg}, $defslidenum);
|
limitArray ($data{$type}{$name}{current}{h4fcslidereg}, $defslidenum);
|
||||||
|
|
||||||
my $gcon = CurrentVal ($hash, "gridconsumption", 0); # aktueller Netzbezug
|
my $gcon = CurrentVal ($hash, "gridconsumption", 0); # aktueller Netzbezug
|
||||||
my $tconsum = CurrentVal ($hash, "tomorrowconsumption", 0); # Verbrauchsprognose für morgigen Tag
|
my $tconsum = CurrentVal ($hash, "tomorrowconsumption", undef); # Verbrauchsprognose für folgenden Tag
|
||||||
my $pvgen = CurrentVal ($hash, "generation", 0);
|
my $pvgen = CurrentVal ($hash, "generation", 0);
|
||||||
my $gfeedin = CurrentVal ($hash, "gridfeedin", 0);
|
my $gfeedin = CurrentVal ($hash, "gridfeedin", 0);
|
||||||
my $batin = CurrentVal ($hash, "powerbatin", 0); # aktuelle Batterieladung
|
my $batin = CurrentVal ($hash, "powerbatin", 0); # aktuelle Batterieladung
|
||||||
@ -2287,7 +2288,7 @@ sub _calcSummaries {
|
|||||||
$data{$type}{$name}{current}{consumption} = $consumption;
|
$data{$type}{$name}{current}{consumption} = $consumption;
|
||||||
|
|
||||||
push @$daref, "Current_Consumption<>". $consumption. " W";
|
push @$daref, "Current_Consumption<>". $consumption. " W";
|
||||||
push @$daref, "Tomorrow_ConsumptionForecast<>".$tconsum. " Wh";
|
push @$daref, "Tomorrow_ConsumptionForecast<>".$tconsum. " Wh" if(defined $tconsum);
|
||||||
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";
|
||||||
push @$daref, "NextHours_Sum03_PVforecast<>". (int $next3HoursSum->{PV})." Wh";
|
push @$daref, "NextHours_Sum03_PVforecast<>". (int $next3HoursSum->{PV})." Wh";
|
||||||
@ -2353,6 +2354,11 @@ sub estConsumptionForecast {
|
|||||||
my $chour = $paref->{chour};
|
my $chour = $paref->{chour};
|
||||||
my $t = $paref->{t};
|
my $t = $paref->{t};
|
||||||
|
|
||||||
|
my $medev = ReadingsVal($name, "currentMeterDev", ""); # aktuelles Meter device
|
||||||
|
my ($a,$h) = parseParams ($medev);
|
||||||
|
$medev = $a->[0] // "";
|
||||||
|
return if(!$medev || !$defs{$medev});
|
||||||
|
|
||||||
my $type = $hash->{TYPE};
|
my $type = $hash->{TYPE};
|
||||||
|
|
||||||
## Verbrauchsvorhersage für den nächsten Tag
|
## Verbrauchsvorhersage für den nächsten Tag
|
||||||
|
Loading…
x
Reference in New Issue
Block a user