We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c4b706d + b3f27dd commit e7c7f0fCopy full SHA for e7c7f0f
adafruit_tsl2561.py
@@ -107,7 +107,7 @@ def enabled(self, enable):
107
108
@property
109
def lux(self):
110
- """The computed lux value."""
+ """The computed lux value or None when value is not computable."""
111
return self._compute_lux()
112
113
@@ -177,7 +177,7 @@ def _compute_lux(self):
177
elif ratio <= 1.30:
178
lux = 0.00146 * ch0 - 0.00112 * ch1
179
else:
180
- lux = 0
+ lux = 0.
181
# Pretty sure the floating point math formula on pg. 23 of datasheet
182
# is based on 16x gain and 402ms integration time. Need to scale
183
# result for other settings.
0 commit comments