10_ZWave.pm: take homeId into account for AssignIoPort (Forum #40594)

git-svn-id: https://svn.fhem.de/fhem/trunk@9219 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2015-09-09 20:09:44 +00:00
parent f075fb7795
commit 6a33cabc22

View File

@@ -480,7 +480,13 @@ ZWave_Define($$)
$hash->{id} = $id;
$modules{ZWave}{defptr}{"$homeId $id"} = $hash;
AssignIoPort($hash); # FIXME: should take homeId into account
my $proposed;
if($init_done) { # Use the right device while inclusion is running
for my $p (devspec2array("TYPE=ZWDongle|FHEM2FHEM")) {
$proposed = $p if($defs{$p}{homeId} && $defs{$p}{homeId} eq $homeId);
}
}
AssignIoPort($hash, $proposed);
if(@a) { # Autocreate: set the classes, execute the init calls
ZWave_SetClasses($homeId, $id, undef, $a[0]);