diff --git a/fhem/fhem.pl b/fhem/fhem.pl index 0772743ee..6fea658bd 100755 --- a/fhem/fhem.pl +++ b/fhem/fhem.pl @@ -4042,6 +4042,7 @@ AttrNum($$$;$) { my ($d,$n,$default,$round) = @_; my $val = AttrVal($d,$n,$default); + return undef if(!defined($val)); $val = ($val =~ /(-?\d+(\.\d+)?)/ ? $1 : ""); $val = round($val,$round) if($round); return $val;