10_ZWave.pm: fix length for config commands (Forum #35293)
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@8275 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -959,7 +959,7 @@ ZWave_configCheckParam($$$$@)
|
|||||||
return ("Parameter is not decimal", "") if($arg[0] !~ m/^[0-9]+$/);
|
return ("Parameter is not decimal", "") if($arg[0] !~ m/^[0-9]+$/);
|
||||||
|
|
||||||
my $len = ($t eq "int" ? 8 : ($t eq "short" ? 4 : 2));
|
my $len = ($t eq "int" ? 8 : ($t eq "short" ? 4 : 2));
|
||||||
return ("", sprintf("04%02x02%0*x", $h->{index}, $len, $arg[0]));
|
return ("", sprintf("04%02x%02x%0*x", $h->{index}, $len/2, $len, $arg[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
my %zwave_alarmType = (
|
my %zwave_alarmType = (
|
||||||
|
|||||||
Reference in New Issue
Block a user