diff --git a/aqi_monitor_py/sensor/sensor_sds011.py b/aqi_monitor_py/sensor/sensor_sds011.py index e3ab986..b3b99be 100644 --- a/aqi_monitor_py/sensor/sensor_sds011.py +++ b/aqi_monitor_py/sensor/sensor_sds011.py @@ -32,7 +32,9 @@ class SDS: def startup(self): """activate and set mode""" self.pm.active = 1 - sleep(0.5) + while self.pm.active.get("value") != 1: + sleep(0.5) + self.pm.mode = simple_sds011.MODE_PASSIVE print("warm up sensor") sleep(20)