31_HUEDevice.pm: perl warning fix

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@25449 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2022-01-10 14:41:00 +00:00
parent c1d413be82
commit e23a38079f

View File

@ -1492,7 +1492,8 @@ HUEDevice_Parse($$)
if( $result->{lights} ) {
$hash->{helper}{lights} = {map {$_=>1} @{$result->{lights}}};
my $lights = join( ",", sort { $a <=> $b } @{$result->{lights}} );
if( $lights ne $hash->{lights} ) {
if( !defined($hash->{lights})
|| $lights ne $hash->{lights} ) {
$hash->{lights} = $lights;
my $lights = join (' ', map( { my $code = $_;