2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-16 23:06:05 +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:
justme-1968 2020-01-07 13:19:57 +00:00
parent 1c696a4a8c
commit 4689147518

View File

@ -613,8 +613,9 @@ HUEDevice_SetParam($$@)
} elsif( $cmd eq "rgb" && $value =~ m/^(..)(..)(..)/) {
my( $r, $g, $b ) = (hex($1)/255.0, hex($2)/255.0, hex($3)/255.0);
if( $name && ( !defined( AttrVal($name, "model", undef) )
|| AttrVal($name, "model", undef) eq 'LLC020') ) {
if( $name && ( !AttrVal($name, "model", undef)
|| AttrVal($name, "model", undef) eq 'LLC020'
|| ($hash->{IODev} && $hash->{IODev}{TYPE} eq 'tradfri' ) ) ) {
my( $h, $s, $v ) = Color::rgb2hsv($r,$g,$b);
$obj->{'on'} = JSON::true;