From 0ce03ae26bbea29d5fe2b26081490eb2ce8f7eb6 Mon Sep 17 00:00:00 2001 From: Keith Burzinski Date: Wed, 28 May 2025 13:55:02 -0500 Subject: [PATCH] Streamline setup() logging (g, h, i) (#8927) --- esphome/components/gcja5/gcja5.cpp | 2 +- esphome/components/gdk101/gdk101.cpp | 2 +- esphome/components/gpio/one_wire/gpio_one_wire.cpp | 2 +- esphome/components/gpio/switch/gpio_switch.cpp | 2 +- esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp | 3 +-- esphome/components/grove_tb6612fng/grove_tb6612fng.cpp | 2 +- .../components/gt911/touchscreen/gt911_touchscreen.cpp | 2 +- esphome/components/hbridge/switch/hbridge_switch.cpp | 2 +- esphome/components/hdc1080/hdc1080.cpp | 2 +- esphome/components/hlw8012/hlw8012.cpp | 2 +- esphome/components/hm3301/hm3301.cpp | 2 +- esphome/components/hmc5883l/hmc5883l.cpp | 2 +- esphome/components/hte501/hte501.cpp | 2 +- esphome/components/htu21d/htu21d.cpp | 2 +- esphome/components/htu31d/htu31d.cpp | 2 +- esphome/components/hx711/hx711.cpp | 2 +- esphome/components/hydreon_rgxx/hydreon_rgxx.cpp | 2 +- esphome/components/i2c/i2c_bus_arduino.cpp | 1 + esphome/components/i2c/i2c_bus_esp_idf.cpp | 2 +- esphome/components/i2s_audio/i2s_audio.cpp | 7 +++---- .../i2s_audio/media_player/i2s_audio_media_player.cpp | 2 +- .../i2s_audio/microphone/i2s_audio_microphone.cpp | 2 +- .../components/i2s_audio/speaker/i2s_audio_speaker.cpp | 2 +- esphome/components/ina219/ina219.cpp | 2 +- esphome/components/ina226/ina226.cpp | 2 +- esphome/components/ina260/ina260.cpp | 2 +- esphome/components/ina2xx_base/ina2xx_base.cpp | 2 +- esphome/components/ina3221/ina3221.cpp | 2 +- .../internal_temperature/internal_temperature.cpp | 8 ++++---- 29 files changed, 34 insertions(+), 35 deletions(-) diff --git a/esphome/components/gcja5/gcja5.cpp b/esphome/components/gcja5/gcja5.cpp index 64b237515b..8aea75b2b4 100644 --- a/esphome/components/gcja5/gcja5.cpp +++ b/esphome/components/gcja5/gcja5.cpp @@ -14,7 +14,7 @@ namespace gcja5 { static const char *const TAG = "gcja5"; -void GCJA5Component::setup() { ESP_LOGCONFIG(TAG, "Setting up gcja5..."); } +void GCJA5Component::setup() { ESP_LOGCONFIG(TAG, "Running setup"); } void GCJA5Component::loop() { const uint32_t now = App.get_loop_component_start_time(); diff --git a/esphome/components/gdk101/gdk101.cpp b/esphome/components/gdk101/gdk101.cpp index 93f3c20fa8..d58c987ed7 100644 --- a/esphome/components/gdk101/gdk101.cpp +++ b/esphome/components/gdk101/gdk101.cpp @@ -34,7 +34,7 @@ void GDK101Component::update() { void GDK101Component::setup() { uint8_t data[2]; - ESP_LOGCONFIG(TAG, "Setting up GDK101..."); + ESP_LOGCONFIG(TAG, "Running setup"); // first, reset the sensor if (!this->reset_sensor_(data)) { this->status_set_error("Reset failed!"); diff --git a/esphome/components/gpio/one_wire/gpio_one_wire.cpp b/esphome/components/gpio/one_wire/gpio_one_wire.cpp index 8a56595efb..7022c5fc31 100644 --- a/esphome/components/gpio/one_wire/gpio_one_wire.cpp +++ b/esphome/components/gpio/one_wire/gpio_one_wire.cpp @@ -8,7 +8,7 @@ namespace gpio { static const char *const TAG = "gpio.one_wire"; void GPIOOneWireBus::setup() { - ESP_LOGCONFIG(TAG, "Setting up 1-wire bus..."); + ESP_LOGCONFIG(TAG, "Running setup"); this->t_pin_->setup(); this->t_pin_->pin_mode(gpio::FLAG_INPUT | gpio::FLAG_PULLUP); // clear bus with 480µs high, otherwise initial reset in search might fail diff --git a/esphome/components/gpio/switch/gpio_switch.cpp b/esphome/components/gpio/switch/gpio_switch.cpp index 5033315b5e..6f901d602d 100644 --- a/esphome/components/gpio/switch/gpio_switch.cpp +++ b/esphome/components/gpio/switch/gpio_switch.cpp @@ -8,7 +8,7 @@ static const char *const TAG = "switch.gpio"; float GPIOSwitch::get_setup_priority() const { return setup_priority::HARDWARE; } void GPIOSwitch::setup() { - ESP_LOGCONFIG(TAG, "Setting up GPIO Switch '%s'...", this->name_.c_str()); + ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str()); bool initial_state = this->get_initial_state_with_restore_mode().value_or(false); diff --git a/esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp b/esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp index ed40ba42a5..9e82109ffc 100644 --- a/esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp +++ b/esphome/components/grove_gas_mc_v2/grove_gas_mc_v2.cpp @@ -33,8 +33,7 @@ bool GroveGasMultichannelV2Component::read_sensor_(uint8_t address, sensor::Sens } void GroveGasMultichannelV2Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up Grove Multichannel Gas Sensor V2..."); - + ESP_LOGCONFIG(TAG, "Running setup"); // Before reading sensor values, must preheat sensor if (!(this->write_bytes(GROVE_GAS_MC_V2_HEAT_ON, {}))) { this->mark_failed(); diff --git a/esphome/components/grove_tb6612fng/grove_tb6612fng.cpp b/esphome/components/grove_tb6612fng/grove_tb6612fng.cpp index 621b7968a4..0dfb8478e7 100644 --- a/esphome/components/grove_tb6612fng/grove_tb6612fng.cpp +++ b/esphome/components/grove_tb6612fng/grove_tb6612fng.cpp @@ -24,7 +24,7 @@ void GroveMotorDriveTB6612FNG::dump_config() { } void GroveMotorDriveTB6612FNG::setup() { - ESP_LOGCONFIG(TAG, "Setting up Grove Motor Drive TB6612FNG ..."); + ESP_LOGCONFIG(TAG, "Running setup"); if (!this->standby()) { this->mark_failed(); return; diff --git a/esphome/components/gt911/touchscreen/gt911_touchscreen.cpp b/esphome/components/gt911/touchscreen/gt911_touchscreen.cpp index 674ef51d64..1cead70181 100644 --- a/esphome/components/gt911/touchscreen/gt911_touchscreen.cpp +++ b/esphome/components/gt911/touchscreen/gt911_touchscreen.cpp @@ -25,7 +25,7 @@ static const size_t MAX_BUTTONS = 4; // max number of buttons scanned void GT911Touchscreen::setup() { i2c::ErrorCode err; - ESP_LOGCONFIG(TAG, "Setting up GT911 Touchscreen..."); + ESP_LOGCONFIG(TAG, "Running setup"); if (this->reset_pin_ != nullptr) { this->reset_pin_->setup(); this->reset_pin_->digital_write(false); diff --git a/esphome/components/hbridge/switch/hbridge_switch.cpp b/esphome/components/hbridge/switch/hbridge_switch.cpp index c0949be947..2a1afa48c5 100644 --- a/esphome/components/hbridge/switch/hbridge_switch.cpp +++ b/esphome/components/hbridge/switch/hbridge_switch.cpp @@ -10,7 +10,7 @@ static const char *const TAG = "switch.hbridge"; float HBridgeSwitch::get_setup_priority() const { return setup_priority::HARDWARE; } void HBridgeSwitch::setup() { - ESP_LOGCONFIG(TAG, "Setting up H-Bridge Switch '%s'...", this->name_.c_str()); + ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str()); optional initial_state = this->get_initial_state_with_restore_mode(); diff --git a/esphome/components/hdc1080/hdc1080.cpp b/esphome/components/hdc1080/hdc1080.cpp index 7186578a22..4c66309e5f 100644 --- a/esphome/components/hdc1080/hdc1080.cpp +++ b/esphome/components/hdc1080/hdc1080.cpp @@ -13,7 +13,7 @@ static const uint8_t HDC1080_CMD_TEMPERATURE = 0x00; static const uint8_t HDC1080_CMD_HUMIDITY = 0x01; void HDC1080Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up HDC1080..."); + ESP_LOGCONFIG(TAG, "Running setup"); const uint8_t data[2] = { 0b00000000, // resolution 14bit for both humidity and temperature diff --git a/esphome/components/hlw8012/hlw8012.cpp b/esphome/components/hlw8012/hlw8012.cpp index 1efc57ab66..1044a528a0 100644 --- a/esphome/components/hlw8012/hlw8012.cpp +++ b/esphome/components/hlw8012/hlw8012.cpp @@ -11,7 +11,7 @@ static const uint32_t HLW8012_CLOCK_FREQUENCY = 3579000; void HLW8012Component::setup() { float reference_voltage = 0; - ESP_LOGCONFIG(TAG, "Setting up HLW8012..."); + ESP_LOGCONFIG(TAG, "Running setup"); this->sel_pin_->setup(); this->sel_pin_->digital_write(this->current_mode_); this->cf_store_.pulse_counter_setup(this->cf_pin_); diff --git a/esphome/components/hm3301/hm3301.cpp b/esphome/components/hm3301/hm3301.cpp index 379c4dbc5a..c03f5f9869 100644 --- a/esphome/components/hm3301/hm3301.cpp +++ b/esphome/components/hm3301/hm3301.cpp @@ -11,7 +11,7 @@ static const uint8_t PM_2_5_VALUE_INDEX = 6; static const uint8_t PM_10_0_VALUE_INDEX = 7; void HM3301Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up HM3301..."); + ESP_LOGCONFIG(TAG, "Running setup"); if (i2c::ERROR_OK != this->write(&SELECT_COMM_CMD, 1)) { error_code_ = ERROR_COMM; this->mark_failed(); diff --git a/esphome/components/hmc5883l/hmc5883l.cpp b/esphome/components/hmc5883l/hmc5883l.cpp index 24f4b3f8f1..3b7a990dcc 100644 --- a/esphome/components/hmc5883l/hmc5883l.cpp +++ b/esphome/components/hmc5883l/hmc5883l.cpp @@ -22,7 +22,7 @@ static const uint8_t HMC5883L_REGISTER_IDENTIFICATION_B = 0x0B; static const uint8_t HMC5883L_REGISTER_IDENTIFICATION_C = 0x0C; void HMC5883LComponent::setup() { - ESP_LOGCONFIG(TAG, "Setting up HMC5583L..."); + ESP_LOGCONFIG(TAG, "Running setup"); uint8_t id[3]; if (!this->read_byte(HMC5883L_REGISTER_IDENTIFICATION_A, &id[0]) || !this->read_byte(HMC5883L_REGISTER_IDENTIFICATION_B, &id[1]) || diff --git a/esphome/components/hte501/hte501.cpp b/esphome/components/hte501/hte501.cpp index 68edd07a22..2aed4729d5 100644 --- a/esphome/components/hte501/hte501.cpp +++ b/esphome/components/hte501/hte501.cpp @@ -7,7 +7,7 @@ namespace hte501 { static const char *const TAG = "hte501"; void HTE501Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up HTE501..."); + ESP_LOGCONFIG(TAG, "Running setup"); uint8_t address[] = {0x70, 0x29}; this->write(address, 2, false); uint8_t identification[9]; diff --git a/esphome/components/htu21d/htu21d.cpp b/esphome/components/htu21d/htu21d.cpp index 411d1e1d6a..b9c2b346f0 100644 --- a/esphome/components/htu21d/htu21d.cpp +++ b/esphome/components/htu21d/htu21d.cpp @@ -18,7 +18,7 @@ static const uint8_t HTU21D_READHEATER_REG_CMD = 0x11; /**< Read Heater Control static const uint8_t HTU21D_REG_HTRE_BIT = 0x02; /**< Control Register Heater Bit */ void HTU21DComponent::setup() { - ESP_LOGCONFIG(TAG, "Setting up HTU21D..."); + ESP_LOGCONFIG(TAG, "Running setup"); if (!this->write_bytes(HTU21D_REGISTER_RESET, nullptr, 0)) { this->mark_failed(); diff --git a/esphome/components/htu31d/htu31d.cpp b/esphome/components/htu31d/htu31d.cpp index bf4689d837..b8cdfbd98e 100644 --- a/esphome/components/htu31d/htu31d.cpp +++ b/esphome/components/htu31d/htu31d.cpp @@ -75,7 +75,7 @@ uint8_t compute_crc(uint32_t value) { * I2C. */ void HTU31DComponent::setup() { - ESP_LOGCONFIG(TAG, "Setting up esphome/components/htu31d HTU31D..."); + ESP_LOGCONFIG(TAG, "Running setup"); if (!this->reset_()) { this->mark_failed(); diff --git a/esphome/components/hx711/hx711.cpp b/esphome/components/hx711/hx711.cpp index 9643d0c411..d9b82fd7cd 100644 --- a/esphome/components/hx711/hx711.cpp +++ b/esphome/components/hx711/hx711.cpp @@ -8,7 +8,7 @@ namespace hx711 { static const char *const TAG = "hx711"; void HX711Sensor::setup() { - ESP_LOGCONFIG(TAG, "Setting up HX711 '%s'...", this->name_.c_str()); + ESP_LOGCONFIG(TAG, "Running setup for '%s'", this->name_.c_str()); this->sck_pin_->setup(); this->dout_pin_->setup(); this->sck_pin_->digital_write(false); diff --git a/esphome/components/hydreon_rgxx/hydreon_rgxx.cpp b/esphome/components/hydreon_rgxx/hydreon_rgxx.cpp index 92d7774193..86cf19eb24 100644 --- a/esphome/components/hydreon_rgxx/hydreon_rgxx.cpp +++ b/esphome/components/hydreon_rgxx/hydreon_rgxx.cpp @@ -39,7 +39,7 @@ void HydreonRGxxComponent::dump_config() { } void HydreonRGxxComponent::setup() { - ESP_LOGCONFIG(TAG, "Setting up hydreon_rgxx..."); + ESP_LOGCONFIG(TAG, "Running setup"); while (this->available() != 0) { this->read(); } diff --git a/esphome/components/i2c/i2c_bus_arduino.cpp b/esphome/components/i2c/i2c_bus_arduino.cpp index cd1b2aacc7..8a3634e9e0 100644 --- a/esphome/components/i2c/i2c_bus_arduino.cpp +++ b/esphome/components/i2c/i2c_bus_arduino.cpp @@ -13,6 +13,7 @@ namespace i2c { static const char *const TAG = "i2c.arduino"; void ArduinoI2CBus::setup() { + ESP_LOGCONFIG(TAG, "Running setup"); recover_(); #if defined(USE_ESP32) diff --git a/esphome/components/i2c/i2c_bus_esp_idf.cpp b/esphome/components/i2c/i2c_bus_esp_idf.cpp index c14300f725..aba30f7bbd 100644 --- a/esphome/components/i2c/i2c_bus_esp_idf.cpp +++ b/esphome/components/i2c/i2c_bus_esp_idf.cpp @@ -18,7 +18,7 @@ namespace i2c { static const char *const TAG = "i2c.idf"; void IDFI2CBus::setup() { - ESP_LOGCONFIG(TAG, "Setting up I2C bus..."); + ESP_LOGCONFIG(TAG, "Running setup"); static i2c_port_t next_port = I2C_NUM_0; port_ = next_port; #if SOC_HP_I2C_NUM > 1 diff --git a/esphome/components/i2s_audio/i2s_audio.cpp b/esphome/components/i2s_audio/i2s_audio.cpp index ad73b383fe..2de3f1d9f8 100644 --- a/esphome/components/i2s_audio/i2s_audio.cpp +++ b/esphome/components/i2s_audio/i2s_audio.cpp @@ -14,18 +14,17 @@ static const uint8_t I2S_NUM_MAX = SOC_I2S_NUM; // because IDF 5+ took this awa #endif void I2SAudioComponent::setup() { - static i2s_port_t next_port_num = I2S_NUM_0; + ESP_LOGCONFIG(TAG, "Running setup"); + static i2s_port_t next_port_num = I2S_NUM_0; if (next_port_num >= I2S_NUM_MAX) { - ESP_LOGE(TAG, "Too many I2S Audio components!"); + ESP_LOGE(TAG, "Too many I2S Audio components"); this->mark_failed(); return; } this->port_ = next_port_num; next_port_num = (i2s_port_t) (next_port_num + 1); - - ESP_LOGCONFIG(TAG, "Setting up I2S Audio..."); } } // namespace i2s_audio diff --git a/esphome/components/i2s_audio/media_player/i2s_audio_media_player.cpp b/esphome/components/i2s_audio/media_player/i2s_audio_media_player.cpp index 34ed5b02a0..db6c3ae228 100644 --- a/esphome/components/i2s_audio/media_player/i2s_audio_media_player.cpp +++ b/esphome/components/i2s_audio/media_player/i2s_audio_media_player.cpp @@ -120,7 +120,7 @@ void I2SAudioMediaPlayer::set_volume_(float volume, bool publish) { } void I2SAudioMediaPlayer::setup() { - ESP_LOGCONFIG(TAG, "Setting up Audio..."); + ESP_LOGCONFIG(TAG, "Running setup"); this->state = media_player::MEDIA_PLAYER_STATE_IDLE; } diff --git a/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp b/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp index 7c11d4f47d..1ce98d51d3 100644 --- a/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp +++ b/esphome/components/i2s_audio/microphone/i2s_audio_microphone.cpp @@ -40,7 +40,7 @@ enum MicrophoneEventGroupBits : uint32_t { }; void I2SAudioMicrophone::setup() { - ESP_LOGCONFIG(TAG, "Setting up I2S Audio Microphone..."); + ESP_LOGCONFIG(TAG, "Running setup"); #ifdef USE_I2S_LEGACY #if SOC_I2S_SUPPORTS_ADC if (this->adc_) { diff --git a/esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp b/esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp index d85409f1a8..f4c761ecc0 100644 --- a/esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp +++ b/esphome/components/i2s_audio/speaker/i2s_audio_speaker.cpp @@ -99,7 +99,7 @@ static const std::vector Q15_VOLUME_SCALING_FACTORS = { 19508, 20665, 21891, 23189, 24565, 26022, 27566, 29201, 30933, 32767}; void I2SAudioSpeaker::setup() { - ESP_LOGCONFIG(TAG, "Setting up I2S Audio Speaker..."); + ESP_LOGCONFIG(TAG, "Running setup"); this->event_group_ = xEventGroupCreate(); diff --git a/esphome/components/ina219/ina219.cpp b/esphome/components/ina219/ina219.cpp index 2fb3bea356..cd59f5016d 100644 --- a/esphome/components/ina219/ina219.cpp +++ b/esphome/components/ina219/ina219.cpp @@ -34,7 +34,7 @@ static const uint8_t INA219_REGISTER_CURRENT = 0x04; static const uint8_t INA219_REGISTER_CALIBRATION = 0x05; void INA219Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up INA219..."); + ESP_LOGCONFIG(TAG, "Running setup"); // Config Register // 0bx000000000000000 << 15 RESET Bit (1 -> trigger reset) if (!this->write_byte_16(INA219_REGISTER_CONFIG, 0x8000)) { diff --git a/esphome/components/ina226/ina226.cpp b/esphome/components/ina226/ina226.cpp index 7a57c118af..110d08ab3f 100644 --- a/esphome/components/ina226/ina226.cpp +++ b/esphome/components/ina226/ina226.cpp @@ -37,7 +37,7 @@ static const uint16_t INA226_ADC_TIMES[] = {140, 204, 332, 588, 1100, 2116, 4156 static const uint16_t INA226_ADC_AVG_SAMPLES[] = {1, 4, 16, 64, 128, 256, 512, 1024}; void INA226Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up INA226..."); + ESP_LOGCONFIG(TAG, "Running setup"); ConfigurationRegister config; diff --git a/esphome/components/ina260/ina260.cpp b/esphome/components/ina260/ina260.cpp index 2f220e6a11..2b6208f60f 100644 --- a/esphome/components/ina260/ina260.cpp +++ b/esphome/components/ina260/ina260.cpp @@ -35,7 +35,7 @@ static const uint8_t INA260_REGISTER_MANUFACTURE_ID = 0xFE; static const uint8_t INA260_REGISTER_DEVICE_ID = 0xFF; void INA260Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up INA260..."); + ESP_LOGCONFIG(TAG, "Running setup"); // Reset device on setup if (!this->write_byte_16(INA260_REGISTER_CONFIG, 0x8000)) { diff --git a/esphome/components/ina2xx_base/ina2xx_base.cpp b/esphome/components/ina2xx_base/ina2xx_base.cpp index 924bf91e5e..0baa720b42 100644 --- a/esphome/components/ina2xx_base/ina2xx_base.cpp +++ b/esphome/components/ina2xx_base/ina2xx_base.cpp @@ -50,7 +50,7 @@ static bool check_model_and_device_match(INAModel model, uint16_t dev_id) { } void INA2XX::setup() { - ESP_LOGCONFIG(TAG, "Setting up INA2xx..."); + ESP_LOGCONFIG(TAG, "Running setup"); if (!this->reset_config_()) { ESP_LOGE(TAG, "Reset failed, check connection"); diff --git a/esphome/components/ina3221/ina3221.cpp b/esphome/components/ina3221/ina3221.cpp index 3f8e2d06df..771f2d0200 100644 --- a/esphome/components/ina3221/ina3221.cpp +++ b/esphome/components/ina3221/ina3221.cpp @@ -22,7 +22,7 @@ static const uint8_t INA3221_REGISTER_CHANNEL3_BUS_VOLTAGE = 0x06; // A0 = SCL -> 0x43 void INA3221Component::setup() { - ESP_LOGCONFIG(TAG, "Setting up INA3221..."); + ESP_LOGCONFIG(TAG, "Running setup"); // Config Register // 0bx000000000000000 << 15 RESET Bit (1 -> trigger reset) if (!this->write_byte_16(INA3221_REGISTER_CONFIG, 0x8000)) { diff --git a/esphome/components/internal_temperature/internal_temperature.cpp b/esphome/components/internal_temperature/internal_temperature.cpp index d3ff7433b6..f503927d8e 100644 --- a/esphome/components/internal_temperature/internal_temperature.cpp +++ b/esphome/components/internal_temperature/internal_temperature.cpp @@ -66,7 +66,7 @@ void InternalTemperatureSensor::update() { esp_err_t result = temperature_sensor_get_celsius(tsensNew, &temperature); success = (result == ESP_OK); if (!success) { - ESP_LOGE(TAG, "Failed to get temperature: %d", result); + ESP_LOGE(TAG, "Reading failed (%d)", result); } #endif // ESP_IDF_VERSION < ESP_IDF_VERSION_VAL(5, 0, 0) #endif // USE_ESP32_VARIANT @@ -103,20 +103,20 @@ void InternalTemperatureSensor::setup() { (defined(USE_ESP32_VARIANT_ESP32C3) || defined(USE_ESP32_VARIANT_ESP32C6) || defined(USE_ESP32_VARIANT_ESP32S2) || \ defined(USE_ESP32_VARIANT_ESP32S3) || defined(USE_ESP32_VARIANT_ESP32H2) || defined(USE_ESP32_VARIANT_ESP32C2) || \ defined(USE_ESP32_VARIANT_ESP32P4)) - ESP_LOGCONFIG(TAG, "Setting up temperature sensor..."); + ESP_LOGCONFIG(TAG, "Running setup"); temperature_sensor_config_t tsens_config = TEMPERATURE_SENSOR_CONFIG_DEFAULT(-10, 80); esp_err_t result = temperature_sensor_install(&tsens_config, &tsensNew); if (result != ESP_OK) { - ESP_LOGE(TAG, "Failed to install temperature sensor: %d", result); + ESP_LOGE(TAG, "Install failed (%d)", result); this->mark_failed(); return; } result = temperature_sensor_enable(tsensNew); if (result != ESP_OK) { - ESP_LOGE(TAG, "Failed to enable temperature sensor: %d", result); + ESP_LOGE(TAG, "Enabling failed (%d)", result); this->mark_failed(); return; }