diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 15e09e176..28233e294 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -9577,8 +9577,8 @@ sub _batChargeRecmd { for my $in (1..$maxinverter) { $in = sprintf "%02d", $in; - my $feed = InverterVal ($hash, $in, 'ifeed', ''); - next if(!$feed || $feed eq 'grid'); # Inverter 'Grid' ausschließen + my $feed = InverterVal ($hash, $in, 'ifeed', 'default'); + next if($feed eq 'grid'); # Inverter 'Grid' ausschließen my $iname = InverterVal ($hash, $in, 'iname', ''); my $icap = InverterVal ($hash, $in, 'invertercap', 0); @@ -10836,7 +10836,10 @@ sub __setConsRcmdState { my ($spignore, $info, $err) = isSurplusIgnoCond ($hash, $c, $debug); # PV Überschuß ignorieren? Log3 ($name, 1, "$name - $err") if($err); - if (!$nompower || $surplus - $rescons > 0 || $spignore) { + if (!defined $surplus) { # $surplus kann undef sein! -> dann bisherigen isConsumptionRecommended verwenden + $data{$name}{consumers}{$c}{isConsumptionRecommended} = ReadingsVal ($name, "consumer${c}_ConsumptionRecommended", 0); + } + elsif (!$nompower || $surplus - $rescons > 0 || $spignore) { $data{$name}{consumers}{$c}{isConsumptionRecommended} = 1; # Einschalten des Consumers günstig bzw. Freigabe für "on" von Überschußseite erteilt } else { @@ -17715,7 +17718,7 @@ sub determSurplus { } } - if (!defined $surplus || $fallback) { # Fehlerkorrektur + if ($fallback) { # Fall Back $surplus = CurrentVal ($hash, 'surplus', 0); $method = $method." but fallback to 'default'"; } @@ -21434,7 +21437,7 @@ to ensure that the system configuration is correct.