2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

76_SolarForecast.pm: contrib 0.46.0

git-svn-id: https://svn.fhem.de/fhem/trunk@24465 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2021-05-17 19:43:55 +00:00
parent 8e08c4d67e
commit bcabceab3f

View File

@ -2111,26 +2111,26 @@ sub _transferMeterValues {
$gco = ReadingsNum ($medev, $gc, 0) * $gcuf; # aktueller Bezug (W) $gco = ReadingsNum ($medev, $gc, 0) * $gcuf; # aktueller Bezug (W)
$gfin = ReadingsNum ($medev, $gf, 0) * $gfuf; # aktuelle Einspeisung (W) $gfin = ReadingsNum ($medev, $gf, 0) * $gfuf; # aktuelle Einspeisung (W)
my $params;
if ($gc eq "-gfeedin") { # Spezialfall gcon bei neg. gfeedin # Spezialfall: bei negativen gfeedin -> $gco = abs($gf), $gf = 0 if ($gc eq "-gfeedin") { # Spezialfall gcon bei neg. gfeedin # Spezialfall: bei negativen gfeedin -> $gco = abs($gf), $gf = 0
$gfin = ReadingsNum ($medev, $gf, 0) * $gfuf; $params = {
if($gfin <= 0) { dev => $medev,
$gco = abs($gfin); rdg => $gf,
$gfin = 0; rdgf => $gfuf
} };
else {
$gco = 0; ($gfin,$gco) = substSpecialCases ($params);
}
} }
if ($gf eq "-gcon") { # Spezialfall gfeedin bei neg. gcon if ($gf eq "-gcon") { # Spezialfall gfeedin bei neg. gcon
$gco = ReadingsNum ($medev, $gc, 0) * $gcuf; # aktueller Bezug (W) $params = {
if($gco <= 0) { dev => $medev,
$gfin = abs($gco); rdg => $gc,
$gco = 0; rdgf => $gcuf
} };
else {
$gfin = 0; ($gco,$gfin) = substSpecialCases ($params);
}
} }
push @$daref, "Current_GridConsumption<>".(int $gco)." W"; push @$daref, "Current_GridConsumption<>".(int $gco)." W";