14 static const char *
const TAG =
"debug";
17 #ifndef ESPHOME_LOG_HAS_DEBUG 21 ESP_LOGCONFIG(TAG,
"Debug component:");
22 #ifdef USE_TEXT_SENSOR 24 #endif // USE_TEXT_SENSOR 26 LOG_SENSOR(
" ",
"Free space on heap", this->
free_sensor_);
27 LOG_SENSOR(
" ",
"Largest free heap block", this->
block_sensor_);
28 #if defined(USE_ESP8266) && USE_ARDUINO_VERSION_CODE >= VERSION_CODE(2, 5, 2) 30 #endif // defined(USE_ESP8266) && USE_ARDUINO_VERSION_CODE >= VERSION_CODE(2, 5, 2) 33 std::string device_info;
34 device_info.reserve(256);
35 ESP_LOGD(TAG,
"ESPHome version %s", ESPHOME_VERSION);
36 device_info += ESPHOME_VERSION;
39 ESP_LOGD(TAG,
"Free Heap Size: %" PRIu32
" bytes", this->
free_heap_);
43 #ifdef USE_TEXT_SENSOR 45 if (device_info.length() > 255)
46 device_info.resize(255);
52 #endif // USE_TEXT_SENSOR 60 ESP_LOGD(TAG,
"Free Heap Size: %" PRIu32
" bytes", this->
free_heap_);
70 this->last_loop_timetag_ = now;
void get_device_info_(std::string &device_info)
void status_momentary_warning(const std::string &name, uint32_t length=5000)
text_sensor::TextSensor * device_info_
const float LATE
For components that should be initialized at the very end of the setup process.
void publish_state(const std::string &state)
sensor::Sensor * loop_time_sensor_
float get_setup_priority() const override
uint32_t IRAM_ATTR HOT millis()
sensor::Sensor * fragmentation_sensor_
void dump_config() override
void publish_state(float state)
Publish a new state to the front-end.
text_sensor::TextSensor * reset_reason_
uint32_t get_free_heap_()
uint32_t last_loop_timetag_
std::string get_reset_reason_()
sensor::Sensor * free_sensor_
Implementation of SPI Controller mode.
sensor::Sensor * block_sensor_