Skip to content

Commit fbaca15

Browse files
committed
Make sure we turn ambient pressure to an int.
1 parent 06b4da0 commit fbaca15

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

adafruit_scd30.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def ambient_pressure(self):
123123

124124
@ambient_pressure.setter
125125
def ambient_pressure(self, pressure_mbar):
126+
pressure_mbar = int(pressure_mbar)
126127
if pressure_mbar != 0 and (pressure_mbar > 1200 or pressure_mbar < 700):
127128
raise AttributeError("ambient_pressure must be from 700 to 1200 mBar")
128129
self._send_command(_CMD_CONTINUOUS_MEASUREMENT, pressure_mbar)

0 commit comments

Comments
 (0)