-
Notifications
You must be signed in to change notification settings - Fork 153
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
lux sensor value #14
Comments
Someone has pointed out the fact from a xiaomi document that the lux sensor gives values between 300-1300. I went ahead and subtracted 300 from the reported value. Now it shows between 0-1000. Which for me is a better representation. |
Here is the link |
@sendorm oh cool, thanks, and it make sense. are you manually subtracting 300 ? |
Yeah, I am directly subtracting 300 in the code. So the reported value is between 0-1000. But still they are not good values. I tried to find a multiplier using the mi flora sensor (which seems to have a much better represantation). The relation might even be quadratic, I might check into that. But in the end it is not necessary, just get the values for your normal usage and create automations accordingly. |
@YinHangCode thanks for adding this to your latest release. |
@astrojetson8 @sendorm It looks like -300 is not a good value. |
yeah some users on the home assistant site also reported that 300 offset is not working for them too. 279 was the least reported as I recall.
|
@sendorm maybe -279 is the most suitable value. |
Maybe but the document here states that the values are between 300-1300. Some one else can say that his values goes down to 275 for instance, so a zero check is a must. |
@sendorm yes, the document description is between 300-1300, but In fact, this is not the case. |
Yes, good solution. Thank you. |
@YinHangCode sounds good. |
fyi: looks like the default value for lux from gateway is around 360lux even when it's pitch dark.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd319008(v=vs.85).aspx
The text was updated successfully, but these errors were encountered: