mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
31_HUEDevice.pm: optional new_id parameter for HUEDevice_IODevChanged()
git-svn-id: https://svn.fhem.de/fhem/trunk@20976 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d0b17fb944
commit
b594d80af6
@ -270,9 +270,9 @@ HUEDevice_summaryFn($$$$)
|
||||
}
|
||||
|
||||
sub
|
||||
HUEDevice_IODevChanged($$$)
|
||||
HUEDevice_IODevChanged($$$;$)
|
||||
{
|
||||
my ($hash,$old,$new) = @_;
|
||||
my ($hash,$old,$new, $new_id) = @_;
|
||||
$hash = $defs{$hash} if( ref($hash) ne 'HASH' );
|
||||
my $name = $hash->{NAME};
|
||||
|
||||
@ -296,6 +296,8 @@ HUEDevice_IODevChanged($$$)
|
||||
}
|
||||
$new = $hash->{IODev}->{NAME} if( defined($hash->{IODev}) );
|
||||
|
||||
$hash->{ID} = $new_id if( defined($new_id) );
|
||||
|
||||
$code = $hash->{ID};
|
||||
$code = $new ."-". $code if( $new );
|
||||
$modules{HUEDevice}{defptr}{$code} = $hash;
|
||||
|
Loading…
x
Reference in New Issue
Block a user