mirror of
https://github.com/esphome/esphome.git
synced 2025-07-30 15:16:37 +00:00
preen
This commit is contained in:
parent
d54724a475
commit
05d1c0300f
@ -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, "Setup %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 took %ums", this->get_component_source(), setup_time);
|
ESP_LOGD(TAG, "Setup %s took %ums", this->get_component_source(), setup_time);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case COMPONENT_STATE_SETUP:
|
case COMPONENT_STATE_SETUP:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user