1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-07 22:29:19 +00:00

correct devicepair dual, virtual command list and attr peerList

git-svn-id: https://svn.fhem.de/fhem/trunk@1937 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2012-10-07 18:02:45 +00:00
parent 9a21e5ee40
commit 0931622367

View File

@ -1389,7 +1389,8 @@ CUL_HM_Set($@)
} }
elsif(!defined($h)) { elsif(!defined($h)) {
my @arr = keys %culHmGlobalSets if($st ne "virtual"); my @arr;
@arr = keys %culHmGlobalSets if($st ne "virtual");
push @arr, keys %{$culHmSubTypeSets{$st}} if($culHmSubTypeSets{$st}); push @arr, keys %{$culHmSubTypeSets{$st}} if($culHmSubTypeSets{$st});
push @arr, keys %{$culHmModelSets{$md}} if($culHmModelSets{$md}); push @arr, keys %{$culHmModelSets{$md}} if($culHmModelSets{$md});
my $usg = "Unknown argument $cmd, choose one of ".join(" ",sort @arr); my $usg = "Unknown argument $cmd, choose one of ".join(" ",sort @arr);
@ -2031,7 +2032,7 @@ CUL_HM_Set($@)
my ($b1,$b2,$nrCh2Pair); my ($b1,$b2,$nrCh2Pair);
$b1 = ($isChannel) ? hex($chn):sprintf("%02X",$bNo); $b1 = ($isChannel) ? hex($chn):sprintf("%02X",$bNo);
$b1 = $b1*2 - 1 if($single && !$chn); $b1 = $b1*2 - 1 if(!$single && !$isChannel);
if ($single){ if ($single){
$b2 = $b1; $b2 = $b1;
$nrCh2Pair = 1; $nrCh2Pair = 1;
@ -2068,6 +2069,7 @@ CUL_HM_Set($@)
$peerlist =~ s/$repl//;#avoid duplicate $peerlist =~ s/$repl//;#avoid duplicate
$peerlist.= $repl if($set == 1); $peerlist.= $repl if($set == 1);
$attr{$btnName}{peerList} = $peerlist; $attr{$btnName}{peerList} = $peerlist;
delete $attr{$btnName}{peerList} if (!$peerlist);
} }
else{ else{
my $bStr = sprintf("%02X",$b); my $bStr = sprintf("%02X",$b);