From 9700a18353081ba3aab3a1a86a0afd2aae3ecd09 Mon Sep 17 00:00:00 2001 From: nymea Date: Thu, 29 Aug 2019 17:52:30 +0200 Subject: [PATCH] fixed raw light value to lux conversion --- philipshue/huemotionsensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/philipshue/huemotionsensor.cpp b/philipshue/huemotionsensor.cpp index 3413e0a5..a27ff24e 100644 --- a/philipshue/huemotionsensor.cpp +++ b/philipshue/huemotionsensor.cpp @@ -167,7 +167,7 @@ void HueMotionSensor::updateStates(const QVariantMap &sensorMap) // If light sensor if (sensorMap.value("uniqueid").toString() == m_lightSensorUuid) { - int lightIntensity = stateMap.value("lightlevel", 0).toInt(); + int lightIntensity = 10^((stateMap.value("lightlevel", 0).toInt()-1)/10000); if (m_lightIntensity != lightIntensity) { m_lightIntensity = lightIntensity; emit lightIntensityChanged(m_lightIntensity);