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

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@7087 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
loredo
2014-11-29 10:37:17 +00:00
parent 59be5f3eb2
commit 4fc3510663

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 ) {