2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

30_HUEBridge.pm: better deCONZ fix

git-svn-id: https://svn.fhem.de/fhem/trunk@9536 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2015-10-19 08:13:39 +00:00
parent 5c38a844f8
commit 85892758a0

View File

@ -468,8 +468,8 @@ HUEBridge_Get($@)
my $code = $name ."-G". $key;
my $fhem_name ="";
$fhem_name = $modules{HUEDevice}{defptr}{$code}->{NAME} if( defined($modules{HUEDevice}{defptr}{$code}) );
$result->{$key}{lights} = '' if( !defined($result->{$key}{lights}) ); #deCONZ fix
$result->{$key}{type} = '<unknown>' if( !defined($result->{$key}{type}) ); #deCONZ fix
$result->{$key}{type} = '' if( !defined($result->{$key}{type}) ); #deCONZ fix
$result->{$key}{lights} = [] if( !defined($result->{$key}{lights}) ); #deCONZ fix
$ret .= sprintf( "%2i: %-15s %-15s %-15s %s\n", $key, $result->{$key}{name}, $fhem_name, $result->{$key}{type}, join( ",", @{$result->{$key}{lights}} ) );
}
$ret = sprintf( "%2s %-15s %-15s %-15s %s\n", "ID", "NAME", "FHEM", "TYPE", "LIGHTS" ) .$ret if( $ret );