mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-19 18:56:03 +00:00
31_HUEDevice.pm: fix for empty setList
git-svn-id: https://svn.fhem.de/fhem/trunk@11910 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
86fdc96444
commit
186115d302
@ -616,7 +616,7 @@ HUEDevice_Set($@)
|
|||||||
|
|
||||||
return undef;
|
return undef;
|
||||||
|
|
||||||
} elsif( my @match = grep { $cmd eq $_ } keys $hash->{helper}{setList}{cmds} ) {
|
} elsif( my @match = grep { $cmd eq $_ } keys ($hash->{helper}{setList}{cmds}?$hash->{helper}{setList}{cmds}:{}) ) {
|
||||||
return HUEBridge_Set( $shash, $shash->{NAME}, 'setsensor', $id, $hash->{helper}{setList}{cmds}{$match[0]} );
|
return HUEBridge_Set( $shash, $shash->{NAME}, 'setsensor', $id, $hash->{helper}{setList}{cmds}{$match[0]} );
|
||||||
|
|
||||||
} elsif( my $entries = $hash->{helper}{setList}{regex} ) {
|
} elsif( my $entries = $hash->{helper}{setList}{regex} ) {
|
||||||
@ -637,7 +637,7 @@ HUEDevice_Set($@)
|
|||||||
|
|
||||||
my $list = 'statusRequest:noArg';
|
my $list = 'statusRequest:noArg';
|
||||||
$list .= ' json' if( $hash->{type} && $hash->{type} =~ /^CLIP/ );
|
$list .= ' json' if( $hash->{type} && $hash->{type} =~ /^CLIP/ );
|
||||||
$list .= ' '. join( ':noArg ', keys $hash->{helper}{setList}{cmds} );
|
$list .= ' '. join( ':noArg ', keys $hash->{helper}{setList}{cmds} ) if( $hash->{helper}{setList}{cmds} );
|
||||||
$list .= ':noArg' if( $hash->{helper}{setList}{cmds} );
|
$list .= ':noArg' if( $hash->{helper}{setList}{cmds} );
|
||||||
if( my $entries = $hash->{helper}{setList}{regex} ) {
|
if( my $entries = $hash->{helper}{setList}{regex} ) {
|
||||||
foreach my $entry (@{$entries}) {
|
foreach my $entry (@{$entries}) {
|
||||||
@ -1423,8 +1423,8 @@ HUEDevice_Attr($$$;$)
|
|||||||
ignore the reachable state that is reported by the hue bridge. assume the device is allways reachable.</li>
|
ignore the reachable state that is reported by the hue bridge. assume the device is allways reachable.</li>
|
||||||
<li>setList<br>
|
<li>setList<br>
|
||||||
The list of know set commands for sensor type devices. one command per line, eg.: <code><br>
|
The list of know set commands for sensor type devices. one command per line, eg.: <code><br>
|
||||||
attr mySensor setList present:{...}\<br>
|
attr mySensor setList present:{<json>}\<br>
|
||||||
absent:{...}</code></li>
|
absent:{<json>}</code></li>
|
||||||
<li>subType<br>
|
<li>subType<br>
|
||||||
extcolordimmer -> device has rgb and color temperatur control<br>
|
extcolordimmer -> device has rgb and color temperatur control<br>
|
||||||
colordimmer -> device has rgb controll<br>
|
colordimmer -> device has rgb controll<br>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user