Dear all,

thanks for the awesome openHAB software and the great and helpful community! Here’s a small contribution I can return.

I’ve played around with the said Aqara devices for a while now and have also seen the very small values for the illuminance channel. I’ve found various threads in the community suggesting to just multiply it by 10.000 to get the lux value. I believe that’s incorrect. You rather need to revert a transformation which is designed in the Zigbee spec but incorrectly implemented in the device.

Just add a custom transformation, e.g. by using a JavaScript Transformation as follows, and you’ll receive the correct value in lux.

```
function log10(val) {
return Math.log(val) / Math.log(10);
}
(function(i) {
var measuredValue = parseFloat(i);
if(isNaN(measuredValue)) return "- lx";
var illuminance = 10000*log10(measuredValue+1);
return illuminance.toFixed(0) + " lx";
})(input)
```

For details see here: https://github.com/openhab/org.openhab.binding.zigbee/issues/573

Cheers!