From 9d27b1b70d5b6cee7c4f8225e2aa284312cedf66 Mon Sep 17 00:00:00 2001 From: Curtis Malainey Date: Sun, 12 Jan 2025 08:47:52 -0800 Subject: [PATCH] [nau7802] fix bad blocking code (esphome/issues#6395) --- esphome/components/nau7802/nau7802.cpp | 4 ---- esphome/components/nau7802/nau7802.h | 2 -- 2 files changed, 6 deletions(-) diff --git a/esphome/components/nau7802/nau7802.cpp b/esphome/components/nau7802/nau7802.cpp index ea6c0258af..d7149e5697 100644 --- a/esphome/components/nau7802/nau7802.cpp +++ b/esphome/components/nau7802/nau7802.cpp @@ -120,8 +120,6 @@ void NAU7802Sensor::complete_setup_() { // PGA stabilizer cap on output i2c::I2CRegister pwr_reg = this->reg(POWER_REG); pwr_reg |= POWER_PGA_CAP_EN; - - this->setup_complete_ = true; } void NAU7802Sensor::dump_config() { @@ -317,7 +315,5 @@ void NAU7802Sensor::update() { bool NAU7802Sensor::is_data_ready_() { return this->reg(PU_CTRL_REG).get() & PU_CTRL_CYCLE_READY; } -bool NAU7802Sensor::can_proceed() { return this->setup_complete_; } - } // namespace nau7802 } // namespace esphome diff --git a/esphome/components/nau7802/nau7802.h b/esphome/components/nau7802/nau7802.h index 3b0372aa89..17e426ccc6 100644 --- a/esphome/components/nau7802/nau7802.h +++ b/esphome/components/nau7802/nau7802.h @@ -61,7 +61,6 @@ class NAU7802Sensor : public sensor::Sensor, public PollingComponent, public i2c void setup() override; void loop() override; - bool can_proceed() override; void dump_config() override; float get_setup_priority() const override; void update() override; @@ -80,7 +79,6 @@ class NAU7802Sensor : public sensor::Sensor, public PollingComponent, public i2c int32_t offset_calibration_; bool offset_calibration_failed_ = false; bool gain_calibration_failed_ = false; - bool setup_complete_ = false; // // Config values