From d0f16c030912d042c777bf059e13c45c1003e310 Mon Sep 17 00:00:00 2001 From: martinp876 <> Date: Sat, 12 Sep 2020 10:09:18 +0000 Subject: [PATCH] CUL_HM:update fraction list for drop-down like temp git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@22762 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/10_CUL_HM.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/FHEM/10_CUL_HM.pm b/FHEM/10_CUL_HM.pm index 2ce3b16b6..8aa624699 100755 --- a/FHEM/10_CUL_HM.pm +++ b/FHEM/10_CUL_HM.pm @@ -4547,8 +4547,11 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++ ($max,$step) = ($1,$2); } my @list = (); + my $f = 0; + ($f) = map{(my $foo = $_) =~ s/.*\.//;length($foo)}($step) if ($step =~ m/\./); + for(my $i = $min;$i <= $max; $i += $step){ - push @list,$i; + push @list,sprintf("%.${f}f",$i); } push @lst1,@list; }