mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-02 00:48:53 +00:00
31_HUEDevice.pm: add scene id in dropdown if multiple scenes with the same name exist
git-svn-id: https://svn.fhem.de/fhem/trunk@19484 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c81b165e47
commit
603aa7bb43
@ -869,7 +869,18 @@ HUEDevice_Set($@)
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
$list .= " scene:". join(",", sort grep { defined } map { if( !containsOneOfMyLights($scenes->{$_}{lights}) ) { undef; } else { my $scene = $scenes->{$_}{name}; $scene =~ s/ /#/g; $scene} } keys %{$scenes} );
|
||||
my %count;
|
||||
map { $count{$scenes->{$_}{name}}++ } keys %{$scenes};
|
||||
$list .= " scene:". join(",", sort grep { defined } map { if( !containsOneOfMyLights($scenes->{$_}{lights}) ) {
|
||||
undef;
|
||||
} else {
|
||||
my $scene = $scenes->{$_}{name};
|
||||
if( $count{$scene} > 1 ) {
|
||||
$scene .= " [id=$_]";
|
||||
}
|
||||
$scene =~ s/ /#/g; $scene;
|
||||
}
|
||||
} keys %{$scenes} );
|
||||
} else {
|
||||
$list .= " scene";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user