70_PHTV.pm: fix ambiHue for changed HUEDevice readings & correct bri+sat calculation if there is no user defined value

git-svn-id: https://svn.fhem.de/fhem/trunk@7087 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
jpawlowski 2014-11-29 10:37:17 +00:00
parent 46b6b1b925
commit f1a3beb4b5

6
fhem/FHEM/70_PHTV.pm Executable file → Normal file
View File

@ -2387,7 +2387,7 @@ sub PHTV_ReceiveCommand($$$) {
|| !defined( $defs{$dev}{TYPE} )
|| $defs{$dev}{TYPE} ne "HUEDevice"
|| $defs{$dev}{READINGS}{reachable}{VAL} ne
"true" )
"1" )
{
next;
}
@ -2483,11 +2483,11 @@ sub PHTV_ReceiveCommand($$$) {
my $satF =
( $sat && $sat > 0 && $sat < 100 )
? $sat / 100
: 0;
: 1;
my $briF =
( $bri && $bri > 0 && $bri < 100 )
? $bri / 100
: 0;
: 1;
my ( $hDec, $sDec, $bDec, $h, $s, $b );
if ( $countLEDs > 0 ) {