76_SolarForecast: fix warning

git-svn-id: https://svn.fhem.de/fhem/trunk@30191 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
DS_Starter
2025-08-11 21:40:30 +00:00
parent d7f8cbc8ce
commit 65a072bced

View File

@@ -22153,8 +22153,7 @@ sub determSurplus {
my $surpmeth = ConsumerVal ($name, $c, 'surpmeth', 'default');
my $splref = CurrentVal ($name, 'surplusslidereg', '');
my $method = 'default';
my $surplus = 0;
my $fallback;
my ($surplus, $fallback);
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
@@ -22193,6 +22192,8 @@ sub determSurplus {
$surplus = CurrentVal ($name, 'surplus', 0);
$method = $method." but fallback to 'default'";
}
$surplus //= 0;
return ($method, $surplus);
}