From bc2f2be6c3b65e433e8c35e692013fe979b3a7cd Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Sun, 8 Aug 2021 16:00:50 +0000 Subject: [PATCH] HMtemplate:bug prevent numbers with multiple decimal places as number - resolved git-svn-id: https://svn.fhem.de/fhem/trunk@24835 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_HMtemplate.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fhem/FHEM/98_HMtemplate.pm b/fhem/FHEM/98_HMtemplate.pm index cb6575ed9..b00cb8d16 100644 --- a/fhem/FHEM/98_HMtemplate.pm +++ b/fhem/FHEM/98_HMtemplate.pm @@ -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