-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting zigbee illuminance value to lux #2837
Comments
100 lowest values of MiJia Light intensity sensorSELECT DISTINCT
CAST(state AS INT) AS `value`,
ROUND(POWER(10, CAST(state AS INT)/10000)-1, 5) AS lx
FROM
states
WHERE entity_id = 'sensor.kitchen_illuminance'
ORDER BY `value`
LIMIT 100;
As you can see, internally sensor works with integer lux value. So, after converting to lux, we can round result to integer. |
This can be implemented here: https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/converters/fromZigbee.js#L955 How to get to Can you give it a shot? |
Merged, thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to Zigbee doc (4.2.2.2.1.1 and 4.3.2.4.1) and Wireshark sources (wireshark-3.2.1/epan/dissectors/packet-zbee-zcl-meas-sensing.c, line 192).
So, if sensor return 14'914 - real illuminance is 30 lx.
Please, implement this for MiJia Light intensity sensor (GZCGQ01LM)
@kirovilya ?
The text was updated successfully, but these errors were encountered: