precise error-report for templist setting

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4669 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876
2014-01-16 19:32:09 +00:00
parent 327d009299
commit b398c126ff

View File

@@ -3100,7 +3100,8 @@ sub CUL_HM_Set($@) {
splice @a,2,1;#remove prep
}
return "To few arguments" if(@a < 4);
return "To many arguments, max 24 pairs" if(@a > (($md =~ m/HM-CC-RT-DN/)?28:50));
return "To many arguments, max 13 pairs" if(@a > 28 && $md =~ m/HM-CC-RT-DN/);
return "To many arguments, max 24 pairs" if(@a > 50 && $md !~ m/HM-CC-RT-DN/);
return "Bad format, use HH:MM TEMP ..." if(@a % 2);
return "Last time spec must be 24:00" if($a[@a-2] ne "24:00");