[tmp102] Remove setup(), optimize logging (#8937)

This commit is contained in:
Keith Burzinski 2025-05-28 18:44:31 -05:00 committed by GitHub
parent 51981335d5
commit cfa8b3b272
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 6 deletions

View File

@ -15,13 +15,11 @@ static const uint8_t TMP102_REGISTER_HIGH_LIMIT = 0x03;
static const float TMP102_CONVERSION_FACTOR = 0.0625;
void TMP102Component::setup() { ESP_LOGCONFIG(TAG, "Running setup"); }
void TMP102Component::dump_config() {
ESP_LOGCONFIG(TAG, "TMP102:");
LOG_I2C_DEVICE(this);
if (this->is_failed()) {
ESP_LOGE(TAG, "Communication with TMP102 failed!");
ESP_LOGE(TAG, "Communication failed");
}
LOG_UPDATE_INTERVAL(this);
LOG_SENSOR(" ", "Temperature", this);

View File

@ -9,10 +9,7 @@ namespace tmp102 {
class TMP102Component : public PollingComponent, public i2c::I2CDevice, public sensor::Sensor {
public:
/// Setup (reset) the sensor and check connection.
void setup() override;
void dump_config() override;
/// Update the sensor values (temperature)
void update() override;
float get_setup_priority() const override;