diff --git a/src/sensors.cpp b/src/sensors.cpp index d9457ee93..742972e37 100644 --- a/src/sensors.cpp +++ b/src/sensors.cpp @@ -73,7 +73,7 @@ void Sensors::loop() { last_activity_ = time_now; } } else if (state_ == State::READING) { - if (temperature_convert_complete()) { + if (temperature_convert_complete() && (time_now - last_activity_ > CONVERSION_MS)) { // LOG_DEBUG(F("Scanning for sensors")); // uncomment for debug bus_.reset_search(); found_.clear(); diff --git a/src/sensors.h b/src/sensors.h index c8dedf664..f11ed826f 100644 --- a/src/sensors.h +++ b/src/sensors.h @@ -89,6 +89,7 @@ class Sensors { static constexpr uint8_t TYPE_DS1825 = 0x3B; static constexpr uint32_t READ_INTERVAL_MS = 5000; // 5 seconds + static constexpr uint32_t CONVERSION_MS = 1000; // 1 seconds static constexpr uint32_t READ_TIMEOUT_MS = 2000; // 2 seconds static constexpr uint32_t SCAN_TIMEOUT_MS = 30000; // 30 seconds