Skip to content

Commit 82830c5

Browse files
authored
Merge pull request #2 from dherrada/patch-2
TVOC and ECO2 changed to tvoc and eco2 respectively
2 parents b076558 + ba69ec8 commit 82830c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

adafruit_ccs811.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,22 +143,22 @@ def _update_data(self):
143143
i2c.write(buf, end=1, stop=False)
144144
i2c.readinto(buf, start=1)
145145

146-
self._eCO2 = (buf[1] << 8) | (buf[2])
147-
self._TVOC = (buf[3] << 8) | (buf[4])
146+
self._eco2 = (buf[1] << 8) | (buf[2])
147+
self._tvoc = (buf[3] << 8) | (buf[4])
148148

149149
if self.error:
150150
raise RuntimeError("Error:" + str(self.error_code))
151151

152152
@property
153-
def TVOC(self): # pylint: disable=invalid-name
153+
def tvoc(self): # pylint: disable=invalid-name
154154
"""Total Volatile Organic Compound in parts per billion."""
155155
self._update_data()
156-
return self._TVOC
156+
return self._tvoc
157157

158158
@property
159-
def eCO2(self): # pylint: disable=invalid-name
159+
def eco2(self): # pylint: disable=invalid-name
160160
"""Equivalent Carbon Dioxide in parts per million. Clipped to 400 to 8192ppm."""
161-
return self._eCO2
161+
return self._eco2
162162

163163
@property
164164
def temperature(self):

0 commit comments

Comments
 (0)