diff --git a/fhem/FHEM/59_Twilight.pm b/fhem/FHEM/59_Twilight.pm index 67854e3f0..8e61ead00 100644 --- a/fhem/FHEM/59_Twilight.pm +++ b/fhem/FHEM/59_Twilight.pm @@ -402,7 +402,7 @@ sub Twilight_Attr { if ( $attrName eq 'useExtWeather' ) { if ($cmd eq 'set') { - return "External weather device already in use, most likely assigned by define" if defined $hash->{helper} && defined $hash->{helper}{extWeather}{regexp} && $hash->{helper}{extWeather}{regexp} =~ m{$attrVal}xms; + return "External weather device already in use, most likely assigned by define" if defined $hash->{helper} && defined $hash->{helper}{extWeather} && defined $hash->{helper}{extWeather}{regexp} && $hash->{helper}{extWeather}{regexp} =~ m{$attrVal}xms; return Twilight_init_ExtWeather_usage($hash, $attrVal); } elsif ($cmd eq 'del') { notifyRegexpChanged( $hash, q{} );