mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
fhem.pl: Chack for IsDisabled in AssignIoPort (Forum #40594)
git-svn-id: https://svn.fhem.de/fhem/trunk@9218 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
f21a89e849
commit
fbb6498239
@ -1761,7 +1761,7 @@ AssignIoPort($;$)
|
|||||||
$proposed = $attr{$hn}{IODev}
|
$proposed = $attr{$hn}{IODev}
|
||||||
if(!$proposed && $attr{$hn} && $attr{$hn}{IODev});
|
if(!$proposed && $attr{$hn} && $attr{$hn}{IODev});
|
||||||
|
|
||||||
if($proposed && $defs{$proposed}) {
|
if($proposed && $defs{$proposed} && !IsDisabled($proposed)) {
|
||||||
$hash->{IODev} = $defs{$proposed};
|
$hash->{IODev} = $defs{$proposed};
|
||||||
$attr{$hn}{IODev} = $proposed if($hasIODevAttr);
|
$attr{$hn}{IODev} = $proposed if($hasIODevAttr);
|
||||||
delete($defs{$proposed}{".clientArray"});
|
delete($defs{$proposed}{".clientArray"});
|
||||||
@ -1770,6 +1770,7 @@ AssignIoPort($;$)
|
|||||||
# Set the I/O device, search for the last compatible one.
|
# Set the I/O device, search for the last compatible one.
|
||||||
for my $p (sort { $defs{$b}{NR} <=> $defs{$a}{NR} } keys %defs) {
|
for my $p (sort { $defs{$b}{NR} <=> $defs{$a}{NR} } keys %defs) {
|
||||||
|
|
||||||
|
next if(IsDisabled($p));
|
||||||
my $cl = $defs{$p}{Clients};
|
my $cl = $defs{$p}{Clients};
|
||||||
$cl = $modules{$defs{$p}{TYPE}}{Clients} if(!$cl);
|
$cl = $modules{$defs{$p}{TYPE}}{Clients} if(!$cl);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user