diff --git a/fhem/contrib/DS_Starter/76_SolarForecast.pm b/fhem/contrib/DS_Starter/76_SolarForecast.pm index 1f0dd44b4..9a87c19f3 100644 --- a/fhem/contrib/DS_Starter/76_SolarForecast.pm +++ b/fhem/contrib/DS_Starter/76_SolarForecast.pm @@ -2638,7 +2638,7 @@ sub Attr { } if ($aName eq "ctrlUserExitFn") { - if($cmd eq "set") { + if($cmd eq "set" && $init_done) { if(!$aVal || $aVal !~ m/^\s*(\{.*\})\s*$/xs) { return "Usage of $aName is wrong. The function has to be specified as \"{}\" "; } @@ -10694,9 +10694,6 @@ sub userExit { my $r; - #$value =~ s/\\/\\\\/g; # escapen of chars for evaluation - #$value =~ s/'/\\'/g; - $uefn = join ' ', split(/\s+/sx, $uefn); # Funktion aus Attr ctrlUserExitFn serialisieren if ($uefn =~ m/^\s*(\{.*\})\s*$/xs) { # unnamed Funktion direkt in ctrlUserExitFn mit {...}