diff --git a/fhem/CHANGED b/fhem/CHANGED index 102dbbd86..7b64d42de 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - bugfix: 51_I2C_TSL2561: correct lux calculation floatArithmetics case - feature: YAMAHA_AVR: add pointer to main zone in Internals for zone defs - change: YAMAHA_AVR: DSP based models use command queue of main zone to execute commands for zone definitions diff --git a/fhem/FHEM/51_I2C_TSL2561.pm b/fhem/FHEM/51_I2C_TSL2561.pm index b684c40fa..336552d55 100644 --- a/fhem/FHEM/51_I2C_TSL2561.pm +++ b/fhem/FHEM/51_I2C_TSL2561.pm @@ -1196,7 +1196,7 @@ sub I2C_TSL2561_CalculateLux($) { if ($hash->{tsl2561Package} == TSL2561_PACKAGE_CS) { # CS package if ($ratio <= 0.52) { - $lux = 0.0315*$channel0 - 0.0593*$channel1*pow($ratio, 1.4); + $lux = 0.0315*$channel0 - 0.0593*$channel0*pow($ratio, 1.4); } elsif ($ratio <= 0.65) { $lux = 0.0229*$channel0 - 0.0291*$channel1; } elsif ($ratio <= 0.80) { @@ -1209,7 +1209,7 @@ sub I2C_TSL2561_CalculateLux($) { } else { # T, FN and CL package if ($ratio <= 0.50) { - $lux = 0.0304*$channel0 - 0.062*$channel1*pow($ratio, 1.4); + $lux = 0.0304*$channel0 - 0.062*$channel0*pow($ratio, 1.4); } elsif ($ratio <= 0.61) { $lux = 0.0224*$channel0 - 0.031*$channel1; } elsif ($ratio <= 0.80) {