mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-08 13:24:56 +00:00
30_tradfri.pm: ikmproved 'get scenes' output
git-svn-id: https://svn.fhem.de/fhem/trunk@23230 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a564d0119a
commit
090bd53907
@ -531,9 +531,21 @@ tradfri_Get($$@)
|
||||
if( my $chash = $modules{HUEDevice}{defptr}{$code} ) {
|
||||
$group = AttrVal( $chash->{NAME}, 'alias', $group );
|
||||
}
|
||||
|
||||
$ret .= sprintf( "%-20s %-20s %-20s", $key, $group, $scene->{name} );
|
||||
$ret .= sprintf( " %s\n", join( ",", @{$scene->{lights}} ) );
|
||||
|
||||
#$ret .= sprintf( " %s\n", join( ",", @{$scene->{lights}} ) );
|
||||
my $lights;
|
||||
foreach my $light (@{$scene->{lights}}) {
|
||||
$lights .= ',' if( $lights );
|
||||
my $code = "$name-$light";
|
||||
if( my $chash = $modules{HUEDevice}{defptr}{$code} ) {
|
||||
$lights .= AttrVal( $chash->{NAME}, 'alias', $chash->{NAME} );
|
||||
} else {
|
||||
$lights .= $light;
|
||||
}
|
||||
}
|
||||
$ret .= "$lights\n";
|
||||
|
||||
}
|
||||
if( $ret ) {
|
||||
my $header = sprintf( "%-20s %-20s %-20s", "ID", "GROUP", "NAME" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user