2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

CUL_HM:bugfix for virtual sd team leads

git-svn-id: https://svn.fhem.de/fhem/trunk@18776 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2019-03-03 08:48:20 +00:00
parent da1295feec
commit be837ed681

View File

@ -3701,7 +3701,6 @@ sub CUL_HM_parseSDteam_2(@){#handle SD team events
} }
return () if (!$sHash->{sdTeam} || $sHash->{sdTeam} ne "sdLead" return () if (!$sHash->{sdTeam} || $sHash->{sdTeam} ne "sdLead"
||!$dHash); ||!$dHash);
my ($chn,$No,$state,$null,$aesKNo,$aesStr) = unpack 'A2A2A2A4A2A8',$p; my ($chn,$No,$state,$null,$aesKNo,$aesStr) = unpack 'A2A2A2A4A2A8',$p;
if(!$dHash->{helper}{alarmNo} || $dHash->{helper}{alarmNo} ne $No){ if(!$dHash->{helper}{alarmNo} || $dHash->{helper}{alarmNo} ne $No){
$dHash->{helper}{alarmNo} = $No; $dHash->{helper}{alarmNo} = $No;
@ -3749,7 +3748,7 @@ sub CUL_HM_updtSDTeam(@){#in: TeamName, optional caller name and its new state
# prio: 1:alarm, 2: unknown, 3: off # prio: 1:alarm, 2: unknown, 3: off
# sState given in input may not yet be visible in readings # sState given in input may not yet be visible in readings
my ($name,$sName,$sState) = @_; my ($name,$sName,$sState) = @_;
return undef if (!$defs{$name} || AttrVal($name,"model","") !~ m "virtual"); return undef if (!$defs{$name} || AttrVal($name,"model","") !~ m "VIRTUAL");
($sName,$sState) = ("","") if (!$sName || !$sState); ($sName,$sState) = ("","") if (!$sName || !$sState);
return undef if (ReadingsVal($name,"state","off") =~ m/smoke-Alarm/); return undef if (ReadingsVal($name,"state","off") =~ m/smoke-Alarm/);
my $dStat = "off"; my $dStat = "off";
@ -8663,10 +8662,11 @@ sub CUL_HM_getChnPeers($){ #which peertype am I
my $chnN = hex(InternalVal($name,"chanNo","0")); my $chnN = hex(InternalVal($name,"chanNo","0"));
$chnN = "-" if ($chnN == 0); $chnN = "-" if ($chnN == 0);
my @chPopt; my @chPopt;
return "-:-" if($devHash->{helper}{mId} eq "0000");
if ($hash->{helper}{role}{chn}){ if ($hash->{helper}{role}{chn}){
if ($hash->{helper}{role}{vrt}){ if ($hash->{helper}{role}{vrt}){
push @chPopt,"v"; push @chPopt,"v";# all except action detector
} }
else{ else{
foreach my $mLst(split(",",$culHmModel->{$devHash->{helper}{mId}}{lst})){ foreach my $mLst(split(",",$culHmModel->{$devHash->{helper}{mId}}{lst})){