mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
10_ZWave.pm: fixing word length config with list Parameter (Forum #38012)
git-svn-id: https://svn.fhem.de/fhem/trunk@8741 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d551d55730
commit
7aa646f466
@ -1180,7 +1180,8 @@ ZWave_configCheckParam($$$$@)
|
||||
my $v = $h->{Item}{$arg[0]};
|
||||
return ("Unknown parameter $arg[0] for $cmd, use one of ".
|
||||
join(",", keys %{$h->{Item}}), "") if(!defined($v));
|
||||
return ("", sprintf("04%02x01%02x", $h->{index}, $v));
|
||||
my $len = ($v > 65535 ? 8 : ($v > 255 ? 4 : 2));
|
||||
return ("", sprintf("04%02x%02d%0*x", $h->{index}, $len/2, $len, $v));
|
||||
}
|
||||
if($t eq "button") {
|
||||
return ("", sprintf("04%02x01%02x", $h->{index}, $h->{value}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user