mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-22 08:11:44 +00:00
31_HUEDevice.pm: bug fix
git-svn-id: https://svn.fhem.de/fhem/trunk@20306 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
9063ff1629
commit
3d7751d7cb
@ -432,8 +432,9 @@ HUEDevice_SetParam($$@)
|
||||
$cmd = 'bri';
|
||||
}
|
||||
|
||||
my $subtype = "extcolordimmer";
|
||||
if( $name ) {
|
||||
my $subtype = AttrVal($name, "subType", "extcolordimmer");
|
||||
$subtype = AttrVal($name, "subType", $subtype);
|
||||
if($cmd eq 'up' ) {
|
||||
$cmd = 'pct';
|
||||
$value = 100;
|
||||
@ -1077,7 +1078,7 @@ HUEDevice_Get($@)
|
||||
$b *= 255;
|
||||
} elsif( ReadingsVal($name,"xy","") =~ m/(.+),(.+)/ ) {
|
||||
my ($x,$y) = ($1, $2);
|
||||
my $Y = ReadingsVal($name,"bri","") / 254.0;
|
||||
my $Y = ReadingsVal($name,"bri",0) / 254.0;
|
||||
|
||||
($r,$g,$b) = xyYtorgb($x,$y,$Y);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user