76_SolarForecast: fix warning
git-svn-id: https://svn.fhem.de/fhem/trunk@30191 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -22153,8 +22153,7 @@ sub determSurplus {
|
|||||||
my $surpmeth = ConsumerVal ($name, $c, 'surpmeth', 'default');
|
my $surpmeth = ConsumerVal ($name, $c, 'surpmeth', 'default');
|
||||||
my $splref = CurrentVal ($name, 'surplusslidereg', '');
|
my $splref = CurrentVal ($name, 'surplusslidereg', '');
|
||||||
my $method = 'default';
|
my $method = 'default';
|
||||||
my $surplus = 0;
|
my ($surplus, $fallback);
|
||||||
my $fallback;
|
|
||||||
|
|
||||||
if ($surpmeth =~ /median/xs) { # Median der Werte in surplusslidereg, !kann UNDEF sein!
|
if ($surpmeth =~ /median/xs) { # Median der Werte in surplusslidereg, !kann UNDEF sein!
|
||||||
my $num = (split '_', $surpmeth)[1]; # Anzahl der (letzten) Array-Elemente die für Median verwendet werden sollen
|
my $num = (split '_', $surpmeth)[1]; # Anzahl der (letzten) Array-Elemente die für Median verwendet werden sollen
|
||||||
@@ -22193,6 +22192,8 @@ sub determSurplus {
|
|||||||
$surplus = CurrentVal ($name, 'surplus', 0);
|
$surplus = CurrentVal ($name, 'surplus', 0);
|
||||||
$method = $method." but fallback to 'default'";
|
$method = $method." but fallback to 'default'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$surplus //= 0;
|
||||||
|
|
||||||
return ($method, $surplus);
|
return ($method, $surplus);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user