mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-23 20:52:13 +00:00
31_HUEDevice.pm: possible fix for set rgb with tradfri iodev
git-svn-id: https://svn.fhem.de/fhem/trunk@20903 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
1c696a4a8c
commit
4689147518
@ -613,8 +613,9 @@ HUEDevice_SetParam($$@)
|
|||||||
} elsif( $cmd eq "rgb" && $value =~ m/^(..)(..)(..)/) {
|
} elsif( $cmd eq "rgb" && $value =~ m/^(..)(..)(..)/) {
|
||||||
my( $r, $g, $b ) = (hex($1)/255.0, hex($2)/255.0, hex($3)/255.0);
|
my( $r, $g, $b ) = (hex($1)/255.0, hex($2)/255.0, hex($3)/255.0);
|
||||||
|
|
||||||
if( $name && ( !defined( AttrVal($name, "model", undef) )
|
if( $name && ( !AttrVal($name, "model", undef)
|
||||||
|| AttrVal($name, "model", undef) eq 'LLC020') ) {
|
|| AttrVal($name, "model", undef) eq 'LLC020'
|
||||||
|
|| ($hash->{IODev} && $hash->{IODev}{TYPE} eq 'tradfri' ) ) ) {
|
||||||
my( $h, $s, $v ) = Color::rgb2hsv($r,$g,$b);
|
my( $h, $s, $v ) = Color::rgb2hsv($r,$g,$b);
|
||||||
|
|
||||||
$obj->{'on'} = JSON::true;
|
$obj->{'on'} = JSON::true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user