Skip to content

Commit 9211f42

Browse files
authored
Fix filter_size setter bug
self._filter was incorrectly being set with the value of _BME680_FILTERSIZES at the index `size` instead of the index of that size in the sizes list.
1 parent cad362d commit 9211f42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_bme680.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def filter_size(self):
188188
@filter_size.setter
189189
def filter_size(self, size):
190190
if size in _BME680_FILTERSIZES:
191-
self._filter = _BME680_FILTERSIZES[size]
191+
self._filter = _BME680_FILTERSIZES.index(size)
192192
else:
193193
raise RuntimeError("Invalid size")
194194

0 commit comments

Comments
 (0)