15static const char *
const TAG =
"debug";
18#ifndef ESPHOME_LOG_HAS_DEBUG
22 ESP_LOGCONFIG(TAG,
"Debug component:");
27 LOG_SENSOR(
" ",
"Free space on heap", this->
free_sensor_);
28 LOG_SENSOR(
" ",
"Largest free heap block", this->
block_sensor_);
30#if defined(USE_ESP8266) && USE_ARDUINO_VERSION_CODE >= VERSION_CODE(2, 5, 2)
35 std::string device_info;
36 device_info.reserve(256);
37 ESP_LOGD(TAG,
"ESPHome version %s", ESPHOME_VERSION);
38 device_info += ESPHOME_VERSION;
41 ESP_LOGD(TAG,
"Free Heap Size: %" PRIu32
" bytes", this->
free_heap_);
47 if (device_info.length() > 255)
48 device_info.resize(255);
66 ESP_LOGD(TAG,
"Free Heap Size: %" PRIu32
" bytes", this->
free_heap_);
76 this->last_loop_timetag_ = now;
uint32_t IRAM_ATTR HOT get_loop_component_start_time() const
Get the cached time in milliseconds from when the current component started its loop execution.
void status_momentary_warning(const std::string &name, uint32_t length=5000)
sensor::Sensor * loop_time_sensor_
float get_setup_priority() const override
uint32_t last_loop_timetag_
void log_partition_info_()
Logs information about the device's partition table.
sensor::Sensor * free_sensor_
sensor::Sensor * fragmentation_sensor_
void dump_config() override
uint32_t get_free_heap_()
sensor::Sensor * block_sensor_
text_sensor::TextSensor * reset_reason_
std::string get_reset_reason_()
sensor::Sensor * cpu_frequency_sensor_
text_sensor::TextSensor * device_info_
void get_device_info_(std::string &device_info)
void publish_state(float state)
Publish a new state to the front-end.
void publish_state(const std::string &state)
const float LATE
For components that should be initialized at the very end of the setup process.
Providing packet encoding functions for exchanging data with a remote host.
uint32_t arch_get_cpu_freq_hz()
Application App
Global storage of Application pointer - only one Application can exist.