1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-28 08:02:23 +01:00
This commit is contained in:
J. Nick Koston
2025-07-24 20:48:51 -10:00
parent 0121dfc514
commit d54724a475

View File

@@ -153,13 +153,13 @@ void Component::call() {
// State Construction: Call setup and set state to setup // State Construction: Call setup and set state to setup
this->set_component_state_(COMPONENT_STATE_SETUP); this->set_component_state_(COMPONENT_STATE_SETUP);
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG #if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG
ESP_LOGD(TAG, "Setting up %s...", this->get_component_source()); ESP_LOGD(TAG, "Setting up %s", this->get_component_source());
uint32_t start_time = millis(); uint32_t start_time = millis();
#endif #endif
this->call_setup(); this->call_setup();
#if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG #if ESPHOME_LOG_LEVEL >= ESPHOME_LOG_LEVEL_DEBUG
uint32_t setup_time = millis() - start_time; uint32_t setup_time = millis() - start_time;
ESP_LOGD(TAG, "%s setup complete (took %ums)", this->get_component_source(), setup_time); ESP_LOGD(TAG, "%s setup took %ums", this->get_component_source(), setup_time);
#endif #endif
break; break;
case COMPONENT_STATE_SETUP: case COMPONENT_STATE_SETUP: