mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
CUL_HM:repair peerChan for device
git-svn-id: https://svn.fhem.de/fhem/trunk@7491 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
82a3dadd56
commit
aeca465c94
@ -4461,10 +4461,14 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
|||||||
($a[5]?$a[5]:"set"),
|
($a[5]?$a[5]:"set"),
|
||||||
($a[6]?$a[6]:"both"));
|
($a[6]?$a[6]:"both"));
|
||||||
$state = "";
|
$state = "";
|
||||||
return "$bNo is not a button number" if(($bNo < 1) && !$roleC);
|
if ($roleD){
|
||||||
|
$bNo = 1 if ($bNo == 0 && $roleC); # role device and channel => button=1
|
||||||
|
return "$bNo is not a button number" if($bNo < 1);
|
||||||
|
}
|
||||||
|
|
||||||
my $peerId = CUL_HM_name2Id($peerN);
|
my $peerId = CUL_HM_name2Id($peerN);
|
||||||
return "please enter peer" if(!$peerId);
|
return "please enter peer" if(!$peerId);
|
||||||
$peerId .= "01" if( length($peerId)==6);
|
$peerId .= "01" if( length($peerId) == 6);
|
||||||
|
|
||||||
my @pCh;
|
my @pCh;
|
||||||
my ($peerHash,$dSet,$cmdB);
|
my ($peerHash,$dSet,$cmdB);
|
||||||
@ -4499,7 +4503,9 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
|
|||||||
else {$set = 1;$cmdB ="01";}
|
else {$set = 1;$cmdB ="01";}
|
||||||
|
|
||||||
my (@b,$nrCh2Pair);
|
my (@b,$nrCh2Pair);
|
||||||
$b[1] = ($roleC) ? hex($chn) : (($single eq "single")?$bNo : ($bNo*2 - 1));
|
$b[1] = ($roleD) ?(($single eq "single")?$bNo : ($bNo*2 - 1))
|
||||||
|
: hex($chn)
|
||||||
|
;
|
||||||
if ($single eq "single"){
|
if ($single eq "single"){
|
||||||
$b[2] = $b[1];
|
$b[2] = $b[1];
|
||||||
$b[1] = 0 if ($st eq "smokeDetector" ||$pSt eq "smokeDetector");
|
$b[1] = 0 if ($st eq "smokeDetector" ||$pSt eq "smokeDetector");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user