HMtemplate:bug prevent numbers with multiple decimal places as number - resolved

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@24835 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2021-08-08 16:00:50 +00:00
parent 6ab4aec557
commit 70d7478240

View File

@ -116,7 +116,7 @@ sub HMtemplate_Attr(@) {#######################################################
elsif ($calc eq "fltCvT60"){ my $calcVal = CUL_HM_CvTflt60(CUL_HM_fltCvT60($attrVal)); return "Value $attrVal not possible. Use $calcVal" if ($attrVal != $calcVal); }
elsif ($calc eq "min2time"){ my $calcVal = CUL_HM_min2time(CUL_HM_time2min($attrVal)); return "Value $attrVal not possible. Use $calcVal" if ($attrVal != $calcVal); }
else{
return "value $attrVal not numeric for $rN" if ($attrVal !~/^\d+?\.?\d?$/);
return "value $attrVal not numeric for $rN" if ($attrVal !~/^\d+?\.?\d*$/);
return "value $attrVal out of range for $rN :"
.$culHmRegDef->{$ty.$rN}{min} ."..."
.$culHmRegDef->{$ty.$rN}{max} if ($culHmRegDef->{$ty.$rN}{min} > $attrVal