Reduce ESP_LOGCONFIG calls (#9026)

This commit is contained in:
J. Nick Koston 2025-06-08 19:02:30 -05:00 committed by GitHub
parent 80dddb4cae
commit c0b05ada1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
218 changed files with 1569 additions and 931 deletions

View File

@ -134,6 +134,7 @@ def get_port_type(port):
def run_miniterm(config, port, args): def run_miniterm(config, port, args):
from aioesphomeapi import LogParser
import serial import serial
from esphome import platformio_api from esphome import platformio_api
@ -158,6 +159,7 @@ def run_miniterm(config, port, args):
ser.dtr = False ser.dtr = False
ser.rts = False ser.rts = False
parser = LogParser()
tries = 0 tries = 0
while tries < 5: while tries < 5:
try: try:
@ -174,8 +176,7 @@ def run_miniterm(config, port, args):
.decode("utf8", "backslashreplace") .decode("utf8", "backslashreplace")
) )
time_str = datetime.now().time().strftime("[%H:%M:%S]") time_str = datetime.now().time().strftime("[%H:%M:%S]")
message = time_str + line safe_print(parser.parse_line(line, time_str))
safe_print(message)
backtrace_state = platformio_api.process_stacktrace( backtrace_state = platformio_api.process_stacktrace(
config, line, backtrace_state=backtrace_state config, line, backtrace_state=backtrace_state

View File

@ -40,9 +40,11 @@ void AbsoluteHumidityComponent::dump_config() {
break; break;
} }
ESP_LOGCONFIG(TAG, "Sources"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Temperature: '%s'", this->temperature_sensor_->get_name().c_str()); "Sources\n"
ESP_LOGCONFIG(TAG, " Relative Humidity: '%s'", this->humidity_sensor_->get_name().c_str()); " Temperature: '%s'\n"
" Relative Humidity: '%s'",
this->temperature_sensor_->get_name().c_str(), this->humidity_sensor_->get_name().c_str());
} }
float AbsoluteHumidityComponent::get_setup_priority() const { return setup_priority::DATA; } float AbsoluteHumidityComponent::get_setup_priority() const { return setup_priority::DATA; }

View File

@ -214,8 +214,10 @@ void AcDimmer::dump_config() {
ESP_LOGCONFIG(TAG, "AcDimmer:"); ESP_LOGCONFIG(TAG, "AcDimmer:");
LOG_PIN(" Output Pin: ", this->gate_pin_); LOG_PIN(" Output Pin: ", this->gate_pin_);
LOG_PIN(" Zero-Cross Pin: ", this->zero_cross_pin_); LOG_PIN(" Zero-Cross Pin: ", this->zero_cross_pin_);
ESP_LOGCONFIG(TAG, " Min Power: %.1f%%", this->store_.min_power / 10.0f); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Init with half cycle: %s", YESNO(this->init_with_half_cycle_)); " Min Power: %.1f%%\n"
" Init with half cycle: %s",
this->store_.min_power / 10.0f, YESNO(this->init_with_half_cycle_));
if (method_ == DIM_METHOD_LEADING_PULSE) { if (method_ == DIM_METHOD_LEADING_PULSE) {
ESP_LOGCONFIG(TAG, " Method: leading pulse"); ESP_LOGCONFIG(TAG, " Method: leading pulse");
} else if (method_ == DIM_METHOD_LEADING) { } else if (method_ == DIM_METHOD_LEADING) {

View File

@ -77,8 +77,10 @@ void ADCSensor::dump_config() {
break; break;
} }
} }
ESP_LOGCONFIG(TAG, " Samples: %i", this->sample_count_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Sampling mode: %s", LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_))); " Samples: %i\n"
" Sampling mode: %s",
this->sample_count_, LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_)));
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -30,8 +30,10 @@ void ADCSensor::dump_config() {
#else #else
LOG_PIN(" Pin: ", this->pin_); LOG_PIN(" Pin: ", this->pin_);
#endif // USE_ADC_SENSOR_VCC #endif // USE_ADC_SENSOR_VCC
ESP_LOGCONFIG(TAG, " Samples: %i", this->sample_count_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Sampling mode: %s", LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_))); " Samples: %i\n"
" Sampling mode: %s",
this->sample_count_, LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_)));
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -22,8 +22,10 @@ void ADCSensor::dump_config() {
#else // USE_ADC_SENSOR_VCC #else // USE_ADC_SENSOR_VCC
LOG_PIN(" Pin: ", this->pin_); LOG_PIN(" Pin: ", this->pin_);
#endif // USE_ADC_SENSOR_VCC #endif // USE_ADC_SENSOR_VCC
ESP_LOGCONFIG(TAG, " Samples: %i", this->sample_count_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Sampling mode: %s", LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_))); " Samples: %i\n"
" Sampling mode: %s",
this->sample_count_, LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_)));
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -33,8 +33,10 @@ void ADCSensor::dump_config() {
LOG_PIN(" Pin: ", this->pin_); LOG_PIN(" Pin: ", this->pin_);
#endif // USE_ADC_SENSOR_VCC #endif // USE_ADC_SENSOR_VCC
} }
ESP_LOGCONFIG(TAG, " Samples: %i", this->sample_count_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Sampling mode: %s", LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_))); " Samples: %i\n"
" Sampling mode: %s",
this->sample_count_, LOG_STR_ARG(sampling_mode_to_str(this->sampling_mode_)));
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -177,11 +177,14 @@ void ADE7880::dump_config() {
LOG_SENSOR(" ", "Power Factor", this->channel_a_->power_factor); LOG_SENSOR(" ", "Power Factor", this->channel_a_->power_factor);
LOG_SENSOR(" ", "Forward Active Energy", this->channel_a_->forward_active_energy); LOG_SENSOR(" ", "Forward Active Energy", this->channel_a_->forward_active_energy);
LOG_SENSOR(" ", "Reverse Active Energy", this->channel_a_->reverse_active_energy); LOG_SENSOR(" ", "Reverse Active Energy", this->channel_a_->reverse_active_energy);
ESP_LOGCONFIG(TAG, " Calibration:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Current: %" PRId32, this->channel_a_->current_gain_calibration); " Calibration:\n"
ESP_LOGCONFIG(TAG, " Voltage: %" PRId32, this->channel_a_->voltage_gain_calibration); " Current: %" PRId32 "\n"
ESP_LOGCONFIG(TAG, " Power: %" PRId32, this->channel_a_->power_gain_calibration); " Voltage: %" PRId32 "\n"
ESP_LOGCONFIG(TAG, " Phase Angle: %u", this->channel_a_->phase_angle_calibration); " Power: %" PRId32 "\n"
" Phase Angle: %u",
this->channel_a_->current_gain_calibration, this->channel_a_->voltage_gain_calibration,
this->channel_a_->power_gain_calibration, this->channel_a_->phase_angle_calibration);
} }
if (this->channel_b_ != nullptr) { if (this->channel_b_ != nullptr) {
@ -193,11 +196,14 @@ void ADE7880::dump_config() {
LOG_SENSOR(" ", "Power Factor", this->channel_b_->power_factor); LOG_SENSOR(" ", "Power Factor", this->channel_b_->power_factor);
LOG_SENSOR(" ", "Forward Active Energy", this->channel_b_->forward_active_energy); LOG_SENSOR(" ", "Forward Active Energy", this->channel_b_->forward_active_energy);
LOG_SENSOR(" ", "Reverse Active Energy", this->channel_b_->reverse_active_energy); LOG_SENSOR(" ", "Reverse Active Energy", this->channel_b_->reverse_active_energy);
ESP_LOGCONFIG(TAG, " Calibration:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Current: %" PRId32, this->channel_b_->current_gain_calibration); " Calibration:\n"
ESP_LOGCONFIG(TAG, " Voltage: %" PRId32, this->channel_b_->voltage_gain_calibration); " Current: %" PRId32 "\n"
ESP_LOGCONFIG(TAG, " Power: %" PRId32, this->channel_b_->power_gain_calibration); " Voltage: %" PRId32 "\n"
ESP_LOGCONFIG(TAG, " Phase Angle: %u", this->channel_b_->phase_angle_calibration); " Power: %" PRId32 "\n"
" Phase Angle: %u",
this->channel_b_->current_gain_calibration, this->channel_b_->voltage_gain_calibration,
this->channel_b_->power_gain_calibration, this->channel_b_->phase_angle_calibration);
} }
if (this->channel_c_ != nullptr) { if (this->channel_c_ != nullptr) {
@ -209,18 +215,23 @@ void ADE7880::dump_config() {
LOG_SENSOR(" ", "Power Factor", this->channel_c_->power_factor); LOG_SENSOR(" ", "Power Factor", this->channel_c_->power_factor);
LOG_SENSOR(" ", "Forward Active Energy", this->channel_c_->forward_active_energy); LOG_SENSOR(" ", "Forward Active Energy", this->channel_c_->forward_active_energy);
LOG_SENSOR(" ", "Reverse Active Energy", this->channel_c_->reverse_active_energy); LOG_SENSOR(" ", "Reverse Active Energy", this->channel_c_->reverse_active_energy);
ESP_LOGCONFIG(TAG, " Calibration:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Current: %" PRId32, this->channel_c_->current_gain_calibration); " Calibration:\n"
ESP_LOGCONFIG(TAG, " Voltage: %" PRId32, this->channel_c_->voltage_gain_calibration); " Current: %" PRId32 "\n"
ESP_LOGCONFIG(TAG, " Power: %" PRId32, this->channel_c_->power_gain_calibration); " Voltage: %" PRId32 "\n"
ESP_LOGCONFIG(TAG, " Phase Angle: %u", this->channel_c_->phase_angle_calibration); " Power: %" PRId32 "\n"
" Phase Angle: %u",
this->channel_c_->current_gain_calibration, this->channel_c_->voltage_gain_calibration,
this->channel_c_->power_gain_calibration, this->channel_c_->phase_angle_calibration);
} }
if (this->channel_n_ != nullptr) { if (this->channel_n_ != nullptr) {
ESP_LOGCONFIG(TAG, " Neutral:"); ESP_LOGCONFIG(TAG, " Neutral:");
LOG_SENSOR(" ", "Current", this->channel_n_->current); LOG_SENSOR(" ", "Current", this->channel_n_->current);
ESP_LOGCONFIG(TAG, " Calibration:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Current: %" PRId32, this->channel_n_->current_gain_calibration); " Calibration:\n"
" Current: %" PRId32,
this->channel_n_->current_gain_calibration);
} }
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);

View File

@ -58,15 +58,18 @@ void ADE7953::dump_config() {
LOG_SENSOR(" ", "Active Power B Sensor", this->active_power_b_sensor_); LOG_SENSOR(" ", "Active Power B Sensor", this->active_power_b_sensor_);
LOG_SENSOR(" ", "Rective Power A Sensor", this->reactive_power_a_sensor_); LOG_SENSOR(" ", "Rective Power A Sensor", this->reactive_power_a_sensor_);
LOG_SENSOR(" ", "Reactive Power B Sensor", this->reactive_power_b_sensor_); LOG_SENSOR(" ", "Reactive Power B Sensor", this->reactive_power_b_sensor_);
ESP_LOGCONFIG(TAG, " USE_ACC_ENERGY_REGS: %d", this->use_acc_energy_regs_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " PGA_V_8: 0x%X", pga_v_); " USE_ACC_ENERGY_REGS: %d\n"
ESP_LOGCONFIG(TAG, " PGA_IA_8: 0x%X", pga_ia_); " PGA_V_8: 0x%X\n"
ESP_LOGCONFIG(TAG, " PGA_IB_8: 0x%X", pga_ib_); " PGA_IA_8: 0x%X\n"
ESP_LOGCONFIG(TAG, " VGAIN_32: 0x%08jX", (uintmax_t) vgain_); " PGA_IB_8: 0x%X\n"
ESP_LOGCONFIG(TAG, " AIGAIN_32: 0x%08jX", (uintmax_t) aigain_); " VGAIN_32: 0x%08jX\n"
ESP_LOGCONFIG(TAG, " BIGAIN_32: 0x%08jX", (uintmax_t) bigain_); " AIGAIN_32: 0x%08jX\n"
ESP_LOGCONFIG(TAG, " AWGAIN_32: 0x%08jX", (uintmax_t) awgain_); " BIGAIN_32: 0x%08jX\n"
ESP_LOGCONFIG(TAG, " BWGAIN_32: 0x%08jX", (uintmax_t) bwgain_); " AWGAIN_32: 0x%08jX\n"
" BWGAIN_32: 0x%08jX",
this->use_acc_energy_regs_, pga_v_, pga_ia_, pga_ib_, (uintmax_t) vgain_, (uintmax_t) aigain_,
(uintmax_t) bigain_, (uintmax_t) awgain_, (uintmax_t) bwgain_);
} }
#define ADE_PUBLISH_(name, val, factor) \ #define ADE_PUBLISH_(name, val, factor) \

View File

@ -12,8 +12,10 @@ using namespace esphome::cover;
void Am43Component::dump_config() { void Am43Component::dump_config() {
LOG_COVER("", "AM43 Cover", this); LOG_COVER("", "AM43 Cover", this);
ESP_LOGCONFIG(TAG, " Device Pin: %d", this->pin_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Invert Position: %d", (int) this->invert_position_); " Device Pin: %d\n"
" Invert Position: %d",
this->pin_, (int) this->invert_position_);
} }
void Am43Component::setup() { void Am43Component::setup() {

View File

@ -34,8 +34,10 @@ void AnalogThresholdBinarySensor::set_sensor(sensor::Sensor *analog_sensor) {
void AnalogThresholdBinarySensor::dump_config() { void AnalogThresholdBinarySensor::dump_config() {
LOG_BINARY_SENSOR("", "Analog Threshold Binary Sensor", this); LOG_BINARY_SENSOR("", "Analog Threshold Binary Sensor", this);
LOG_SENSOR(" ", "Sensor", this->sensor_); LOG_SENSOR(" ", "Sensor", this->sensor_);
ESP_LOGCONFIG(TAG, " Upper threshold: %.11f", this->upper_threshold_.value()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Lower threshold: %.11f", this->lower_threshold_.value()); " Upper threshold: %.11f\n"
" Lower threshold: %.11f",
this->upper_threshold_.value(), this->lower_threshold_.value());
} }
} // namespace analog_threshold } // namespace analog_threshold

View File

@ -108,9 +108,12 @@ void APDS9306::dump_config() {
} }
} }
ESP_LOGCONFIG(TAG, " Gain: %u", AMBIENT_LIGHT_GAIN_VALUES[this->gain_]); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Measurement rate: %u", MEASUREMENT_RATE_VALUES[this->measurement_rate_]); " Gain: %u\n"
ESP_LOGCONFIG(TAG, " Measurement Resolution/Bit width: %d", MEASUREMENT_BIT_WIDTH_VALUES[this->bit_width_]); " Measurement rate: %u\n"
" Measurement Resolution/Bit width: %d",
AMBIENT_LIGHT_GAIN_VALUES[this->gain_], MEASUREMENT_RATE_VALUES[this->measurement_rate_],
MEASUREMENT_BIT_WIDTH_VALUES[this->bit_width_]);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -175,8 +175,10 @@ void APIServer::loop() {
} }
void APIServer::dump_config() { void APIServer::dump_config() {
ESP_LOGCONFIG(TAG, "API Server:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Address: %s:%u", network::get_use_address().c_str(), this->port_); "API Server:\n"
" Address: %s:%u",
network::get_use_address().c_str(), this->port_);
#ifdef USE_API_NOISE #ifdef USE_API_NOISE
ESP_LOGCONFIG(TAG, " Using noise encryption: %s", YESNO(this->noise_ctx_->has_psk())); ESP_LOGCONFIG(TAG, " Using noise encryption: %s", YESNO(this->noise_ctx_->has_psk()));
if (!this->noise_ctx_->has_psk()) { if (!this->noise_ctx_->has_psk()) {

View File

@ -5,7 +5,7 @@ from datetime import datetime
import logging import logging
from typing import TYPE_CHECKING, Any from typing import TYPE_CHECKING, Any
from aioesphomeapi import APIClient from aioesphomeapi import APIClient, parse_log_message
from aioesphomeapi.log_runner import async_run from aioesphomeapi.log_runner import async_run
from esphome.const import CONF_KEY, CONF_PASSWORD, CONF_PORT, __version__ from esphome.const import CONF_KEY, CONF_PASSWORD, CONF_PORT, __version__
@ -48,7 +48,10 @@ async def async_run_logs(config: dict[str, Any], address: str) -> None:
text = message.decode("utf8", "backslashreplace") text = message.decode("utf8", "backslashreplace")
if dashboard: if dashboard:
text = text.replace("\033", "\\033") text = text.replace("\033", "\\033")
print(f"[{time_.hour:02}:{time_.minute:02}:{time_.second:02}]{text}") for parsed_msg in parse_log_message(
text, f"[{time_.hour:02}:{time_.minute:02}:{time_.second:02}]"
):
print(parsed_msg)
stop = await async_run(cli, on_log, name=name) stop = await async_run(cli, on_log, name=name)
try: try:

View File

@ -95,11 +95,13 @@ void AS5600Component::dump_config() {
return; return;
} }
ESP_LOGCONFIG(TAG, " Watchdog: %d", this->watchdog_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Fast Filter: %d", this->fast_filter_); " Watchdog: %d\n"
ESP_LOGCONFIG(TAG, " Slow Filter: %d", this->slow_filter_); " Fast Filter: %d\n"
ESP_LOGCONFIG(TAG, " Hysteresis: %d", this->hysteresis_); " Slow Filter: %d\n"
ESP_LOGCONFIG(TAG, " Start Position: %d", this->start_position_); " Hysteresis: %d\n"
" Start Position: %d",
this->watchdog_, this->fast_filter_, this->slow_filter_, this->hysteresis_, this->start_position_);
if (this->end_mode_ == END_MODE_POSITION) { if (this->end_mode_ == END_MODE_POSITION) {
ESP_LOGCONFIG(TAG, " End Position: %d", this->end_position_); ESP_LOGCONFIG(TAG, " End Position: %d", this->end_position_);
} else { } else {

View File

@ -41,9 +41,11 @@ void AS7341Component::dump_config() {
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL); ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
} }
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
ESP_LOGCONFIG(TAG, " Gain: %u", get_gain()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " ATIME: %u", get_atime()); " Gain: %u\n"
ESP_LOGCONFIG(TAG, " ASTEP: %u", get_astep()); " ATIME: %u\n"
" ASTEP: %u",
get_gain(), get_atime(), get_astep());
LOG_SENSOR(" ", "F1", this->f1_); LOG_SENSOR(" ", "F1", this->f1_);
LOG_SENSOR(" ", "F2", this->f2_); LOG_SENSOR(" ", "F2", this->f2_);

View File

@ -75,15 +75,18 @@ void AT581XComponent::setup() { ESP_LOGCONFIG(TAG, "Running setup"); }
void AT581XComponent::dump_config() { LOG_I2C_DEVICE(this); } void AT581XComponent::dump_config() { LOG_I2C_DEVICE(this); }
#define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0])) #define ARRAY_SIZE(X) (sizeof(X) / sizeof((X)[0]))
bool AT581XComponent::i2c_write_config() { bool AT581XComponent::i2c_write_config() {
ESP_LOGCONFIG(TAG, "Writing new config for AT581X"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, "Frequency: %dMHz", this->freq_); "Writing new config for AT581X\n"
ESP_LOGCONFIG(TAG, "Sensing distance: %d", this->delta_); "Frequency: %dMHz\n"
ESP_LOGCONFIG(TAG, "Power: %dµA", this->power_); "Sensing distance: %d\n"
ESP_LOGCONFIG(TAG, "Gain: %d", this->gain_); "Power: %dµA\n"
ESP_LOGCONFIG(TAG, "Trigger base time: %dms", this->trigger_base_time_ms_); "Gain: %d\n"
ESP_LOGCONFIG(TAG, "Trigger keep time: %dms", this->trigger_keep_time_ms_); "Trigger base time: %dms\n"
ESP_LOGCONFIG(TAG, "Protect time: %dms", this->protect_time_ms_); "Trigger keep time: %dms\n"
ESP_LOGCONFIG(TAG, "Self check time: %dms", this->self_check_time_ms_); "Protect time: %dms\n"
"Self check time: %dms",
this->freq_, this->delta_, this->power_, this->gain_, this->trigger_base_time_ms_,
this->trigger_keep_time_ms_, this->protect_time_ms_, this->self_check_time_ms_);
// Set frequency point // Set frequency point
if (!this->i2c_write_reg(FREQ_ADDR, GAIN61_VALUE)) { if (!this->i2c_write_reg(FREQ_ADDR, GAIN61_VALUE)) {

View File

@ -60,8 +60,10 @@ void AXS15231Touchscreen::dump_config() {
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_); LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_); LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Width: %d", this->x_raw_max_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Height: %d", this->y_raw_max_); " Width: %d\n"
" Height: %d",
this->x_raw_max_, this->y_raw_max_);
} }
} // namespace axs15231 } // namespace axs15231

View File

@ -194,11 +194,14 @@ Trigger<> *BangBangClimate::get_heat_trigger() const { return this->heat_trigger
void BangBangClimate::set_supports_heat(bool supports_heat) { this->supports_heat_ = supports_heat; } void BangBangClimate::set_supports_heat(bool supports_heat) { this->supports_heat_ = supports_heat; }
void BangBangClimate::dump_config() { void BangBangClimate::dump_config() {
LOG_CLIMATE("", "Bang Bang Climate", this); LOG_CLIMATE("", "Bang Bang Climate", this);
ESP_LOGCONFIG(TAG, " Supports HEAT: %s", YESNO(this->supports_heat_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Supports COOL: %s", YESNO(this->supports_cool_)); " Supports HEAT: %s\n"
ESP_LOGCONFIG(TAG, " Supports AWAY mode: %s", YESNO(this->supports_away_)); " Supports COOL: %s\n"
ESP_LOGCONFIG(TAG, " Default Target Temperature Low: %.2f°C", this->normal_config_.default_temperature_low); " Supports AWAY mode: %s\n"
ESP_LOGCONFIG(TAG, " Default Target Temperature High: %.2f°C", this->normal_config_.default_temperature_high); " Default Target Temperature Low: %.2f°C\n"
" Default Target Temperature High: %.2f°C",
YESNO(this->supports_heat_), YESNO(this->supports_cool_), YESNO(this->supports_away_),
this->normal_config_.default_temperature_low, this->normal_config_.default_temperature_high);
} }
BangBangClimateTargetTempConfig::BangBangClimateTargetTempConfig() = default; BangBangClimateTargetTempConfig::BangBangClimateTargetTempConfig() = default;

View File

@ -484,9 +484,11 @@ void BedJetHub::loop() {}
void BedJetHub::update() { this->dispatch_status_(); } void BedJetHub::update() { this->dispatch_status_(); }
void BedJetHub::dump_config() { void BedJetHub::dump_config() {
ESP_LOGCONFIG(TAG, "BedJet Hub '%s'", this->get_name().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " ble_client.app_id: %d", this->parent()->app_id); "BedJet Hub '%s'\n"
ESP_LOGCONFIG(TAG, " ble_client.conn_id: %d", this->parent()->get_conn_id()); " ble_client.app_id: %d\n"
" ble_client.conn_id: %d",
this->get_name().c_str(), this->parent()->app_id, this->parent()->get_conn_id());
LOG_UPDATE_INTERVAL(this) LOG_UPDATE_INTERVAL(this)
ESP_LOGCONFIG(TAG, " Child components (%d):", this->children_.size()); ESP_LOGCONFIG(TAG, " Child components (%d):", this->children_.size());
for (auto *child : this->children_) { for (auto *child : this->children_) {

View File

@ -345,8 +345,10 @@ light::ESPColorView BekenSPILEDStripLightOutput::get_view_internal(int32_t index
} }
void BekenSPILEDStripLightOutput::dump_config() { void BekenSPILEDStripLightOutput::dump_config() {
ESP_LOGCONFIG(TAG, "Beken SPI LED Strip:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Pin: %u", this->pin_); "Beken SPI LED Strip:\n"
" Pin: %u",
this->pin_);
const char *rgb_order; const char *rgb_order;
switch (this->rgb_order_) { switch (this->rgb_order_) {
case ORDER_RGB: case ORDER_RGB:
@ -371,9 +373,11 @@ void BekenSPILEDStripLightOutput::dump_config() {
rgb_order = "UNKNOWN"; rgb_order = "UNKNOWN";
break; break;
} }
ESP_LOGCONFIG(TAG, " RGB Order: %s", rgb_order); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max refresh rate: %" PRIu32, *this->max_refresh_rate_); " RGB Order: %s\n"
ESP_LOGCONFIG(TAG, " Number of LEDs: %u", this->num_leds_); " Max refresh rate: %" PRIu32 "\n"
" Number of LEDs: %u",
rgb_order, *this->max_refresh_rate_, this->num_leds_);
} }
float BekenSPILEDStripLightOutput::get_setup_priority() const { return setup_priority::HARDWARE; } float BekenSPILEDStripLightOutput::get_setup_priority() const { return setup_priority::HARDWARE; }

View File

@ -196,14 +196,17 @@ void BL0942::received_package_(DataPacket *data) {
} }
void BL0942::dump_config() { // NOLINT(readability-function-cognitive-complexity) void BL0942::dump_config() { // NOLINT(readability-function-cognitive-complexity)
ESP_LOGCONFIG(TAG, "BL0942:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Reset: %s", TRUEFALSE(this->reset_)); "BL0942:\n"
ESP_LOGCONFIG(TAG, " Address: %d", this->address_); " Reset: %s\n"
ESP_LOGCONFIG(TAG, " Nominal line frequency: %d Hz", this->line_freq_); " Address: %d\n"
ESP_LOGCONFIG(TAG, " Current reference: %f", this->current_reference_); " Nominal line frequency: %d Hz\n"
ESP_LOGCONFIG(TAG, " Energy reference: %f", this->energy_reference_); " Current reference: %f\n"
ESP_LOGCONFIG(TAG, " Power reference: %f", this->power_reference_); " Energy reference: %f\n"
ESP_LOGCONFIG(TAG, " Voltage reference: %f", this->voltage_reference_); " Power reference: %f\n"
" Voltage reference: %f",
TRUEFALSE(this->reset_), this->address_, this->line_freq_, this->current_reference_,
this->energy_reference_, this->power_reference_, this->voltage_reference_);
LOG_SENSOR("", "Voltage", this->voltage_sensor_); LOG_SENSOR("", "Voltage", this->voltage_sensor_);
LOG_SENSOR("", "Current", this->current_sensor_); LOG_SENSOR("", "Current", this->current_sensor_);
LOG_SENSOR("", "Power", this->power_sensor_); LOG_SENSOR("", "Power", this->power_sensor_);

View File

@ -10,9 +10,12 @@ static const char *const TAG = "ble_binary_output";
void BLEBinaryOutput::dump_config() { void BLEBinaryOutput::dump_config() {
ESP_LOGCONFIG(TAG, "BLE Binary Output:"); ESP_LOGCONFIG(TAG, "BLE Binary Output:");
ESP_LOGCONFIG(TAG, " MAC address : %s", this->parent_->address_str().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Service UUID : %s", this->service_uuid_.to_string().c_str()); " MAC address : %s\n"
ESP_LOGCONFIG(TAG, " Characteristic UUID: %s", this->char_uuid_.to_string().c_str()); " Service UUID : %s\n"
" Characteristic UUID: %s",
this->parent_->address_str().c_str(), this->service_uuid_.to_string().c_str(),
this->char_uuid_.to_string().c_str());
LOG_BINARY_OUTPUT(this); LOG_BINARY_OUTPUT(this);
} }

View File

@ -15,11 +15,14 @@ void BLESensor::loop() {}
void BLESensor::dump_config() { void BLESensor::dump_config() {
LOG_SENSOR("", "BLE Sensor", this); LOG_SENSOR("", "BLE Sensor", this);
ESP_LOGCONFIG(TAG, " MAC address : %s", this->parent()->address_str().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Service UUID : %s", this->service_uuid_.to_string().c_str()); " MAC address : %s\n"
ESP_LOGCONFIG(TAG, " Characteristic UUID: %s", this->char_uuid_.to_string().c_str()); " Service UUID : %s\n"
ESP_LOGCONFIG(TAG, " Descriptor UUID : %s", this->descr_uuid_.to_string().c_str()); " Characteristic UUID: %s\n"
ESP_LOGCONFIG(TAG, " Notifications : %s", YESNO(this->notify_)); " Descriptor UUID : %s\n"
" Notifications : %s",
this->parent()->address_str().c_str(), this->service_uuid_.to_string().c_str(),
this->char_uuid_.to_string().c_str(), this->descr_uuid_.to_string().c_str(), YESNO(this->notify_));
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -18,11 +18,14 @@ void BLETextSensor::loop() {}
void BLETextSensor::dump_config() { void BLETextSensor::dump_config() {
LOG_TEXT_SENSOR("", "BLE Text Sensor", this); LOG_TEXT_SENSOR("", "BLE Text Sensor", this);
ESP_LOGCONFIG(TAG, " MAC address : %s", this->parent()->address_str().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Service UUID : %s", this->service_uuid_.to_string().c_str()); " MAC address : %s\n"
ESP_LOGCONFIG(TAG, " Characteristic UUID: %s", this->char_uuid_.to_string().c_str()); " Service UUID : %s\n"
ESP_LOGCONFIG(TAG, " Descriptor UUID : %s", this->descr_uuid_.to_string().c_str()); " Characteristic UUID: %s\n"
ESP_LOGCONFIG(TAG, " Notifications : %s", YESNO(this->notify_)); " Descriptor UUID : %s\n"
" Notifications : %s",
this->parent()->address_str().c_str(), this->service_uuid_.to_string().c_str(),
this->char_uuid_.to_string().c_str(), this->descr_uuid_.to_string().c_str(), YESNO(this->notify_));
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -146,9 +146,11 @@ void BluetoothProxy::send_api_packet_(const esp32_ble_tracker::ESPBTDevice &devi
void BluetoothProxy::dump_config() { void BluetoothProxy::dump_config() {
ESP_LOGCONFIG(TAG, "Bluetooth Proxy:"); ESP_LOGCONFIG(TAG, "Bluetooth Proxy:");
ESP_LOGCONFIG(TAG, " Active: %s", YESNO(this->active_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Connections: %d", this->connections_.size()); " Active: %s\n"
ESP_LOGCONFIG(TAG, " Raw advertisements: %s", YESNO(this->raw_advertisements_)); " Connections: %d\n"
" Raw advertisements: %s",
YESNO(this->active_), this->connections_.size(), YESNO(this->raw_advertisements_));
} }
int BluetoothProxy::get_bluetooth_connections_free() { int BluetoothProxy::get_bluetooth_connections_free() {

View File

@ -159,11 +159,15 @@ void BME680BSECComponent::dump_config() {
this->bme680_status_); this->bme680_status_);
} }
ESP_LOGCONFIG(TAG, " Temperature Offset: %.2f", this->temperature_offset_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " IAQ Mode: %s", this->iaq_mode_ == IAQ_MODE_STATIC ? "Static" : "Mobile"); " Temperature Offset: %.2f\n"
ESP_LOGCONFIG(TAG, " Supply Voltage: %sV", this->supply_voltage_ == SUPPLY_VOLTAGE_3V3 ? "3.3" : "1.8"); " IAQ Mode: %s\n"
ESP_LOGCONFIG(TAG, " Sample Rate: %s", BME680_BSEC_SAMPLE_RATE_LOG(this->sample_rate_)); " Supply Voltage: %sV\n"
ESP_LOGCONFIG(TAG, " State Save Interval: %ims", this->state_save_interval_ms_); " Sample Rate: %s\n"
" State Save Interval: %ims",
this->temperature_offset_, this->iaq_mode_ == IAQ_MODE_STATIC ? "Static" : "Mobile",
this->supply_voltage_ == SUPPLY_VOLTAGE_3V3 ? "3.3" : "1.8",
BME680_BSEC_SAMPLE_RATE_LOG(this->sample_rate_), this->state_save_interval_ms_);
LOG_SENSOR(" ", "Temperature", this->temperature_sensor_); LOG_SENSOR(" ", "Temperature", this->temperature_sensor_);
ESP_LOGCONFIG(TAG, " Sample Rate: %s", BME680_BSEC_SAMPLE_RATE_LOG(this->temperature_sample_rate_)); ESP_LOGCONFIG(TAG, " Sample Rate: %s", BME680_BSEC_SAMPLE_RATE_LOG(this->temperature_sample_rate_));

View File

@ -58,13 +58,13 @@ void BME68xBSEC2Component::setup() {
} }
void BME68xBSEC2Component::dump_config() { void BME68xBSEC2Component::dump_config() {
ESP_LOGCONFIG(TAG, "BME68X via BSEC2:"); ESP_LOGCONFIG(TAG,
"BME68X via BSEC2:\n"
ESP_LOGCONFIG(TAG, " BSEC2 version: %d.%d.%d.%d", this->version_.major, this->version_.minor, " BSEC2 version: %d.%d.%d.%d\n"
this->version_.major_bugfix, this->version_.minor_bugfix); " BSEC2 configuration blob:\n"
" Configured: %s",
ESP_LOGCONFIG(TAG, " BSEC2 configuration blob:"); this->version_.major, this->version_.minor, this->version_.major_bugfix, this->version_.minor_bugfix,
ESP_LOGCONFIG(TAG, " Configured: %s", YESNO(this->bsec2_blob_configured_)); YESNO(this->bsec2_blob_configured_));
if (this->bsec2_configuration_ != nullptr && this->bsec2_configuration_length_) { if (this->bsec2_configuration_ != nullptr && this->bsec2_configuration_length_) {
ESP_LOGCONFIG(TAG, " Size: %" PRIu32, this->bsec2_configuration_length_); ESP_LOGCONFIG(TAG, " Size: %" PRIu32, this->bsec2_configuration_length_);
} }
@ -77,11 +77,14 @@ void BME68xBSEC2Component::dump_config() {
if (this->algorithm_output_ != ALGORITHM_OUTPUT_IAQ) { if (this->algorithm_output_ != ALGORITHM_OUTPUT_IAQ) {
ESP_LOGCONFIG(TAG, " Algorithm output: %s", BME68X_BSEC2_ALGORITHM_OUTPUT_LOG(this->algorithm_output_)); ESP_LOGCONFIG(TAG, " Algorithm output: %s", BME68X_BSEC2_ALGORITHM_OUTPUT_LOG(this->algorithm_output_));
} }
ESP_LOGCONFIG(TAG, " Operating age: %s", BME68X_BSEC2_OPERATING_AGE_LOG(this->operating_age_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Sample rate: %s", BME68X_BSEC2_SAMPLE_RATE_LOG(this->sample_rate_)); " Operating age: %s\n"
ESP_LOGCONFIG(TAG, " Voltage: %s", BME68X_BSEC2_VOLTAGE_LOG(this->voltage_)); " Sample rate: %s\n"
ESP_LOGCONFIG(TAG, " State save interval: %ims", this->state_save_interval_ms_); " Voltage: %s\n"
ESP_LOGCONFIG(TAG, " Temperature offset: %.2f", this->temperature_offset_); " State save interval: %ims\n"
" Temperature offset: %.2f",
BME68X_BSEC2_OPERATING_AGE_LOG(this->operating_age_), BME68X_BSEC2_SAMPLE_RATE_LOG(this->sample_rate_),
BME68X_BSEC2_VOLTAGE_LOG(this->voltage_), this->state_save_interval_ms_, this->temperature_offset_);
#ifdef USE_SENSOR #ifdef USE_SENSOR
LOG_SENSOR(" ", "Temperature", this->temperature_sensor_); LOG_SENSOR(" ", "Temperature", this->temperature_sensor_);

View File

@ -148,8 +148,10 @@ void BMP3XXComponent::setup() {
} }
void BMP3XXComponent::dump_config() { void BMP3XXComponent::dump_config() {
ESP_LOGCONFIG(TAG, "BMP3XX:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Type: %s (0x%X)", LOG_STR_ARG(chip_type_to_str(this->chip_id_.reg)), this->chip_id_.reg); "BMP3XX:\n"
" Type: %s (0x%X)",
LOG_STR_ARG(chip_type_to_str(this->chip_id_.reg)), this->chip_id_.reg);
switch (this->error_code_) { switch (this->error_code_) {
case NONE: case NONE:
break; break;

View File

@ -98,14 +98,20 @@ void BMP581Component::dump_config() {
if (this->temperature_sensor_) { if (this->temperature_sensor_) {
LOG_SENSOR(" ", "Temperature", this->temperature_sensor_); LOG_SENSOR(" ", "Temperature", this->temperature_sensor_);
ESP_LOGCONFIG(TAG, " IIR Filter: %s", LOG_STR_ARG(iir_filter_to_str(this->iir_temperature_level_))); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Oversampling: %s", LOG_STR_ARG(oversampling_to_str(this->temperature_oversampling_))); " IIR Filter: %s\n"
" Oversampling: %s",
LOG_STR_ARG(iir_filter_to_str(this->iir_temperature_level_)),
LOG_STR_ARG(oversampling_to_str(this->temperature_oversampling_)));
} }
if (this->pressure_sensor_) { if (this->pressure_sensor_) {
LOG_SENSOR(" ", "Pressure", this->pressure_sensor_); LOG_SENSOR(" ", "Pressure", this->pressure_sensor_);
ESP_LOGCONFIG(TAG, " IIR Filter: %s", LOG_STR_ARG(iir_filter_to_str(this->iir_pressure_level_))); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Oversampling: %s", LOG_STR_ARG(oversampling_to_str(this->pressure_oversampling_))); " IIR Filter: %s\n"
" Oversampling: %s",
LOG_STR_ARG(iir_filter_to_str(this->iir_pressure_level_)),
LOG_STR_ARG(oversampling_to_str(this->pressure_oversampling_)));
} }
} }

View File

@ -26,8 +26,10 @@ void BP1658CJ::dump_config() {
ESP_LOGCONFIG(TAG, "BP1658CJ:"); ESP_LOGCONFIG(TAG, "BP1658CJ:");
LOG_PIN(" Data Pin: ", this->data_pin_); LOG_PIN(" Data Pin: ", this->data_pin_);
LOG_PIN(" Clock Pin: ", this->clock_pin_); LOG_PIN(" Clock Pin: ", this->clock_pin_);
ESP_LOGCONFIG(TAG, " Color Channels Max Power: %u", this->max_power_color_channels_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " White Channels Max Power: %u", this->max_power_white_channels_); " Color Channels Max Power: %u\n"
" White Channels Max Power: %u",
this->max_power_color_channels_, this->max_power_white_channels_);
} }
void BP1658CJ::loop() { void BP1658CJ::loop() {

View File

@ -52,9 +52,11 @@ void CAP1188Component::dump_config() {
ESP_LOGCONFIG(TAG, "CAP1188:"); ESP_LOGCONFIG(TAG, "CAP1188:");
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_PIN(" Reset Pin: ", this->reset_pin_); LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " Product ID: 0x%x", this->cap1188_product_id_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Manufacture ID: 0x%x", this->cap1188_manufacture_id_); " Product ID: 0x%x\n"
ESP_LOGCONFIG(TAG, " Revision ID: 0x%x", this->cap1188_revision_); " Manufacture ID: 0x%x\n"
" Revision ID: 0x%x",
this->cap1188_product_id_, this->cap1188_manufacture_id_, this->cap1188_revision_);
switch (this->error_code_) { switch (this->error_code_) {
case COMMUNICATION_FAILED: case COMMUNICATION_FAILED:

View File

@ -38,9 +38,11 @@ void CHSC6XTouchscreen::dump_config() {
ESP_LOGCONFIG(TAG, "CHSC6X Touchscreen:"); ESP_LOGCONFIG(TAG, "CHSC6X Touchscreen:");
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_); LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
ESP_LOGCONFIG(TAG, " Touch timeout: %d", this->touch_timeout_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " x_raw_max_: %d", this->x_raw_max_); " Touch timeout: %d\n"
ESP_LOGCONFIG(TAG, " y_raw_max_: %d", this->y_raw_max_); " x_raw_max_: %d\n"
" y_raw_max_: %d",
this->touch_timeout_, this->x_raw_max_, this->y_raw_max_);
} }
} // namespace chsc6x } // namespace chsc6x

View File

@ -569,17 +569,22 @@ bool Climate::set_custom_preset_(const std::string &preset) {
void Climate::dump_traits_(const char *tag) { void Climate::dump_traits_(const char *tag) {
auto traits = this->get_traits(); auto traits = this->get_traits();
ESP_LOGCONFIG(tag, "ClimateTraits:"); ESP_LOGCONFIG(tag, "ClimateTraits:");
ESP_LOGCONFIG(tag, " [x] Visual settings:"); ESP_LOGCONFIG(tag,
ESP_LOGCONFIG(tag, " - Min temperature: %.1f", traits.get_visual_min_temperature()); " [x] Visual settings:\n"
ESP_LOGCONFIG(tag, " - Max temperature: %.1f", traits.get_visual_max_temperature()); " - Min temperature: %.1f\n"
ESP_LOGCONFIG(tag, " - Temperature step:"); " - Max temperature: %.1f\n"
ESP_LOGCONFIG(tag, " Target: %.1f", traits.get_visual_target_temperature_step()); " - Temperature step:\n"
" Target: %.1f",
traits.get_visual_min_temperature(), traits.get_visual_max_temperature(),
traits.get_visual_target_temperature_step());
if (traits.get_supports_current_temperature()) { if (traits.get_supports_current_temperature()) {
ESP_LOGCONFIG(tag, " Current: %.1f", traits.get_visual_current_temperature_step()); ESP_LOGCONFIG(tag, " Current: %.1f", traits.get_visual_current_temperature_step());
} }
if (traits.get_supports_target_humidity() || traits.get_supports_current_humidity()) { if (traits.get_supports_target_humidity() || traits.get_supports_current_humidity()) {
ESP_LOGCONFIG(tag, " - Min humidity: %.0f", traits.get_visual_min_humidity()); ESP_LOGCONFIG(tag,
ESP_LOGCONFIG(tag, " - Max humidity: %.0f", traits.get_visual_max_humidity()); " - Min humidity: %.0f\n"
" - Max humidity: %.0f",
traits.get_visual_min_humidity(), traits.get_visual_max_humidity());
} }
if (traits.get_supports_two_point_target_temperature()) { if (traits.get_supports_two_point_target_temperature()) {
ESP_LOGCONFIG(tag, " [x] Supports two-point target temperature"); ESP_LOGCONFIG(tag, " [x] Supports two-point target temperature");

View File

@ -75,10 +75,13 @@ void ClimateIR::control(const climate::ClimateCall &call) {
} }
void ClimateIR::dump_config() { void ClimateIR::dump_config() {
LOG_CLIMATE("", "IR Climate", this); LOG_CLIMATE("", "IR Climate", this);
ESP_LOGCONFIG(TAG, " Min. Temperature: %.1f°C", this->minimum_temperature_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max. Temperature: %.1f°C", this->maximum_temperature_); " Min. Temperature: %.1f°C\n"
ESP_LOGCONFIG(TAG, " Supports HEAT: %s", YESNO(this->supports_heat_)); " Max. Temperature: %.1f°C\n"
ESP_LOGCONFIG(TAG, " Supports COOL: %s", YESNO(this->supports_cool_)); " Supports HEAT: %s\n"
" Supports COOL: %s",
this->minimum_temperature_, this->maximum_temperature_, YESNO(this->supports_heat_),
YESNO(this->supports_cool_));
} }
} // namespace climate_ir } // namespace climate_ir

View File

@ -319,18 +319,23 @@ bool CS5460AComponent::check_status_() {
void CS5460AComponent::dump_config() { void CS5460AComponent::dump_config() {
uint32_t state = this->get_component_state(); uint32_t state = this->get_component_state();
ESP_LOGCONFIG(TAG, "CS5460A:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Init status: %s", "CS5460A:\n"
" Init status: %s",
state == COMPONENT_STATE_LOOP ? "OK" : (state == COMPONENT_STATE_FAILED ? "failed" : "other")); state == COMPONENT_STATE_LOOP ? "OK" : (state == COMPONENT_STATE_FAILED ? "failed" : "other"));
LOG_PIN(" CS Pin: ", cs_); LOG_PIN(" CS Pin: ", cs_);
ESP_LOGCONFIG(TAG, " Samples / cycle: %" PRIu32, samples_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Phase offset: %i", phase_offset_); " Samples / cycle: %" PRIu32 "\n"
ESP_LOGCONFIG(TAG, " PGA Gain: %s", pga_gain_ == CS5460A_PGA_GAIN_50X ? "50x" : "10x"); " Phase offset: %i\n"
ESP_LOGCONFIG(TAG, " Current gain: %.5f", current_gain_); " PGA Gain: %s\n"
ESP_LOGCONFIG(TAG, " Voltage gain: %.5f", voltage_gain_); " Current gain: %.5f\n"
ESP_LOGCONFIG(TAG, " Current HPF: %s", current_hpf_ ? "enabled" : "disabled"); " Voltage gain: %.5f\n"
ESP_LOGCONFIG(TAG, " Voltage HPF: %s", voltage_hpf_ ? "enabled" : "disabled"); " Current HPF: %s\n"
ESP_LOGCONFIG(TAG, " Pulse energy: %.2f Wh", pulse_energy_wh_); " Voltage HPF: %s\n"
" Pulse energy: %.2f Wh",
samples_, phase_offset_, pga_gain_ == CS5460A_PGA_GAIN_50X ? "50x" : "10x", current_gain_,
voltage_gain_, current_hpf_ ? "enabled" : "disabled", voltage_hpf_ ? "enabled" : "disabled",
pulse_energy_wh_);
LOG_SENSOR(" ", "Voltage", voltage_sensor_); LOG_SENSOR(" ", "Voltage", voltage_sensor_);
LOG_SENSOR(" ", "Current", current_sensor_); LOG_SENSOR(" ", "Current", current_sensor_);
LOG_SENSOR(" ", "Power", power_sensor_); LOG_SENSOR(" ", "Power", power_sensor_);

View File

@ -74,8 +74,10 @@ void CST816Touchscreen::dump_config() {
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_); LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_); LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " X Raw Min: %d, X Raw Max: %d", this->x_raw_min_, this->x_raw_max_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Y Raw Min: %d, Y Raw Max: %d", this->y_raw_min_, this->y_raw_max_); " X Raw Min: %d, X Raw Max: %d\n"
" Y Raw Min: %d, Y Raw Max: %d",
this->x_raw_min_, this->x_raw_max_, this->y_raw_min_, this->y_raw_max_);
const char *name; const char *name;
switch (this->chip_id_) { switch (this->chip_id_) {
case CST820_CHIP_ID: case CST820_CHIP_ID:

View File

@ -151,8 +151,10 @@ void CurrentBasedCover::dump_config() {
if (this->max_duration_ != UINT32_MAX) { if (this->max_duration_ != UINT32_MAX) {
ESP_LOGCONFIG(TAG, "Maximum duration: %.1fs", this->max_duration_ / 1e3f); ESP_LOGCONFIG(TAG, "Maximum duration: %.1fs", this->max_duration_ / 1e3f);
} }
ESP_LOGCONFIG(TAG, "Start sensing delay: %.1fs", this->start_sensing_delay_ / 1e3f); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, "Malfunction detection: %s", YESNO(this->malfunction_detection_)); "Start sensing delay: %.1fs\n"
"Malfunction detection: %s",
this->start_sensing_delay_ / 1e3f, YESNO(this->malfunction_detection_));
} }
float CurrentBasedCover::get_setup_priority() const { return setup_priority::DATA; } float CurrentBasedCover::get_setup_priority() const { return setup_priority::DATA; }

View File

@ -107,8 +107,10 @@ std::string DebugComponent::get_wakeup_cause_() {
} }
void DebugComponent::log_partition_info_() { void DebugComponent::log_partition_info_() {
ESP_LOGCONFIG(TAG, "Partition table:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " %-12s %-4s %-8s %-10s %-10s", "Name", "Type", "Subtype", "Address", "Size"); "Partition table:\n"
" %-12s %-4s %-8s %-10s %-10s",
"Name", "Type", "Subtype", "Address", "Size");
esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL); esp_partition_iterator_t it = esp_partition_find(ESP_PARTITION_TYPE_ANY, ESP_PARTITION_SUBTYPE_ANY, NULL);
while (it != NULL) { while (it != NULL) {
const esp_partition_t *partition = esp_partition_get(it); const esp_partition_t *partition = esp_partition_get(it);

View File

@ -46,10 +46,12 @@ void DeepSleepComponent::dump_config_platform_() {
LOG_PIN(" Wakeup Pin: ", this->wakeup_pin_); LOG_PIN(" Wakeup Pin: ", this->wakeup_pin_);
} }
if (this->wakeup_cause_to_run_duration_.has_value()) { if (this->wakeup_cause_to_run_duration_.has_value()) {
ESP_LOGCONFIG(TAG, " Default Wakeup Run Duration: %" PRIu32 " ms", ESP_LOGCONFIG(TAG,
this->wakeup_cause_to_run_duration_->default_cause); " Default Wakeup Run Duration: %" PRIu32 " ms\n"
ESP_LOGCONFIG(TAG, " Touch Wakeup Run Duration: %" PRIu32 " ms", this->wakeup_cause_to_run_duration_->touch_cause); " Touch Wakeup Run Duration: %" PRIu32 " ms\n"
ESP_LOGCONFIG(TAG, " GPIO Wakeup Run Duration: %" PRIu32 " ms", this->wakeup_cause_to_run_duration_->gpio_cause); " GPIO Wakeup Run Duration: %" PRIu32 " ms",
this->wakeup_cause_to_run_duration_->default_cause, this->wakeup_cause_to_run_duration_->touch_cause,
this->wakeup_cause_to_run_duration_->gpio_cause);
} }
} }

View File

@ -182,9 +182,11 @@ using display_writer_t = std::function<void(Display &)>;
#define LOG_DISPLAY(prefix, type, obj) \ #define LOG_DISPLAY(prefix, type, obj) \
if ((obj) != nullptr) { \ if ((obj) != nullptr) { \
ESP_LOGCONFIG(TAG, prefix type); \ ESP_LOGCONFIG(TAG, \
ESP_LOGCONFIG(TAG, "%s Rotations: %d °", prefix, (obj)->rotation_); \ prefix type "\n" \
ESP_LOGCONFIG(TAG, "%s Dimensions: %dpx x %dpx", prefix, (obj)->get_width(), (obj)->get_height()); \ "%s Rotations: %d °\n" \
"%s Dimensions: %dpx x %dpx", \
prefix, (obj)->rotation_, prefix, (obj)->get_width(), (obj)->get_height()); \
} }
/// Turn the pixel OFF. /// Turn the pixel OFF.

View File

@ -86,9 +86,11 @@ void DPS310Component::setup() {
} }
void DPS310Component::dump_config() { void DPS310Component::dump_config() {
ESP_LOGCONFIG(TAG, "DPS310:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Product ID: %u", this->prod_rev_id_ & 0x0F); "DPS310:\n"
ESP_LOGCONFIG(TAG, " Revision ID: %u", (this->prod_rev_id_ >> 4) & 0x0F); " Product ID: %u\n"
" Revision ID: %u",
this->prod_rev_id_ & 0x0F, (this->prod_rev_id_ >> 4) & 0x0F);
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL); ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);

View File

@ -278,9 +278,11 @@ bool Dsmr::parse_telegram() {
} }
void Dsmr::dump_config() { void Dsmr::dump_config() {
ESP_LOGCONFIG(TAG, "DSMR:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max telegram length: %d", this->max_telegram_len_); "DSMR:\n"
ESP_LOGCONFIG(TAG, " Receive timeout: %.1fs", this->receive_timeout_ / 1e3f); " Max telegram length: %d\n"
" Receive timeout: %.1fs",
this->max_telegram_len_, this->receive_timeout_ / 1e3f);
if (this->request_pin_ != nullptr) { if (this->request_pin_ != nullptr) {
LOG_PIN(" Request Pin: ", this->request_pin_); LOG_PIN(" Request Pin: ", this->request_pin_);
} }

View File

@ -94,9 +94,11 @@ void DutyTimeSensor::publish_and_save_(const uint32_t sec, const uint32_t ms) {
} }
void DutyTimeSensor::dump_config() { void DutyTimeSensor::dump_config() {
ESP_LOGCONFIG(TAG, "Duty Time:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Update Interval: %" PRId32 "ms", this->get_update_interval()); "Duty Time:\n"
ESP_LOGCONFIG(TAG, " Restore: %s", ONOFF(this->restore_)); " Update Interval: %" PRId32 "ms\n"
" Restore: %s",
this->get_update_interval(), ONOFF(this->restore_));
LOG_SENSOR(" ", "Duty Time Sensor:", this); LOG_SENSOR(" ", "Duty Time Sensor:", this);
LOG_SENSOR(" ", "Last Duty Time Sensor:", this->last_duty_time_sensor_); LOG_SENSOR(" ", "Last Duty Time Sensor:", this->last_duty_time_sensor_);
} }

View File

@ -100,8 +100,10 @@ void Emc2101Component::dump_config() {
if (this->dac_mode_) { if (this->dac_mode_) {
ESP_LOGCONFIG(TAG, " DAC Conversion Rate: %X", this->dac_conversion_rate_); ESP_LOGCONFIG(TAG, " DAC Conversion Rate: %X", this->dac_conversion_rate_);
} else { } else {
ESP_LOGCONFIG(TAG, " PWM Resolution: %02X", this->pwm_resolution_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " PWM Divider: %02X", this->pwm_divider_); " PWM Resolution: %02X\n"
" PWM Divider: %02X",
this->pwm_resolution_, this->pwm_divider_);
} }
ESP_LOGCONFIG(TAG, " Inverted: %s", YESNO(this->inverted_)); ESP_LOGCONFIG(TAG, " Inverted: %s", YESNO(this->inverted_));
} }

View File

@ -25,9 +25,11 @@ static const size_t MCLK_DIV_FRE = 256;
} }
void ES7210::dump_config() { void ES7210::dump_config() {
ESP_LOGCONFIG(TAG, "ES7210 audio ADC:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Bits Per Sample: %" PRIu8, this->bits_per_sample_); "ES7210 audio ADC:\n"
ESP_LOGCONFIG(TAG, " Sample Rate: %" PRIu32, this->sample_rate_); " Bits Per Sample: %" PRIu8 "\n"
" Sample Rate: %" PRIu32,
this->bits_per_sample_, this->sample_rate_);
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGE(TAG, " Failed to initialize"); ESP_LOGE(TAG, " Failed to initialize");

View File

@ -52,11 +52,13 @@ void ES8311::setup() {
} }
void ES8311::dump_config() { void ES8311::dump_config() {
ESP_LOGCONFIG(TAG, "ES8311 Audio Codec:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Use MCLK: %s", YESNO(this->use_mclk_)); "ES8311 Audio Codec:\n"
ESP_LOGCONFIG(TAG, " Use Microphone: %s", YESNO(this->use_mic_)); " Use MCLK: %s\n"
ESP_LOGCONFIG(TAG, " DAC Bits per Sample: %" PRIu8, this->resolution_out_); " Use Microphone: %s\n"
ESP_LOGCONFIG(TAG, " Sample Rate: %" PRIu32, this->sample_frequency_); " DAC Bits per Sample: %" PRIu8 "\n"
" Sample Rate: %" PRIu32,
YESNO(this->use_mclk_), YESNO(this->use_mic_), this->resolution_out_, this->sample_frequency_);
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGCONFIG(TAG, " Failed to initialize!"); ESP_LOGCONFIG(TAG, " Failed to initialize!");

View File

@ -408,10 +408,12 @@ void ESP32BLE::dump_config() {
io_capability_s = "invalid"; io_capability_s = "invalid";
break; break;
} }
ESP_LOGCONFIG(TAG, "ESP32 BLE:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " MAC address: %02X:%02X:%02X:%02X:%02X:%02X", mac_address[0], mac_address[1], mac_address[2], "ESP32 BLE:\n"
mac_address[3], mac_address[4], mac_address[5]); " MAC address: %02X:%02X:%02X:%02X:%02X:%02X\n"
ESP_LOGCONFIG(TAG, " IO Capability: %s", io_capability_s); " IO Capability: %s",
mac_address[0], mac_address[1], mac_address[2], mac_address[3], mac_address[4], mac_address[5],
io_capability_s);
} else { } else {
ESP_LOGCONFIG(TAG, "ESP32 BLE: bluetooth stack is not enabled"); ESP_LOGCONFIG(TAG, "ESP32 BLE: bluetooth stack is not enabled");
} }

View File

@ -45,8 +45,10 @@ void BLEClientBase::loop() {
float BLEClientBase::get_setup_priority() const { return setup_priority::AFTER_BLUETOOTH; } float BLEClientBase::get_setup_priority() const { return setup_priority::AFTER_BLUETOOTH; }
void BLEClientBase::dump_config() { void BLEClientBase::dump_config() {
ESP_LOGCONFIG(TAG, " Address: %s", this->address_str().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Auto-Connect: %s", TRUEFALSE(this->auto_connect_)); " Address: %s\n"
" Auto-Connect: %s",
this->address_str().c_str(), TRUEFALSE(this->auto_connect_));
std::string state_name; std::string state_name;
switch (this->state()) { switch (this->state()) {
case espbt::ClientState::INIT: case espbt::ClientState::INIT:

View File

@ -731,11 +731,14 @@ uint64_t ESPBTDevice::address_uint64() const { return esp32_ble::ble_addr_to_uin
void ESP32BLETracker::dump_config() { void ESP32BLETracker::dump_config() {
ESP_LOGCONFIG(TAG, "BLE Tracker:"); ESP_LOGCONFIG(TAG, "BLE Tracker:");
ESP_LOGCONFIG(TAG, " Scan Duration: %" PRIu32 " s", this->scan_duration_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Scan Interval: %.1f ms", this->scan_interval_ * 0.625f); " Scan Duration: %" PRIu32 " s\n"
ESP_LOGCONFIG(TAG, " Scan Window: %.1f ms", this->scan_window_ * 0.625f); " Scan Interval: %.1f ms\n"
ESP_LOGCONFIG(TAG, " Scan Type: %s", this->scan_active_ ? "ACTIVE" : "PASSIVE"); " Scan Window: %.1f ms\n"
ESP_LOGCONFIG(TAG, " Continuous Scanning: %s", YESNO(this->scan_continuous_)); " Scan Type: %s\n"
" Continuous Scanning: %s",
this->scan_duration_, this->scan_interval_ * 0.625f, this->scan_window_ * 0.625f,
this->scan_active_ ? "ACTIVE" : "PASSIVE", YESNO(this->scan_continuous_));
switch (this->scanner_state_) { switch (this->scanner_state_) {
case ScannerState::IDLE: case ScannerState::IDLE:
ESP_LOGCONFIG(TAG, " Scanner State: IDLE"); ESP_LOGCONFIG(TAG, " Scanner State: IDLE");

View File

@ -46,17 +46,20 @@ void ESP32Camera::setup() {
void ESP32Camera::dump_config() { void ESP32Camera::dump_config() {
auto conf = this->config_; auto conf = this->config_;
ESP_LOGCONFIG(TAG, "ESP32 Camera:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Name: %s", this->name_.c_str()); "ESP32 Camera:\n"
ESP_LOGCONFIG(TAG, " Internal: %s", YESNO(this->internal_)); " Name: %s\n"
ESP_LOGCONFIG(TAG, " Data Pins: D0:%d D1:%d D2:%d D3:%d D4:%d D5:%d D6:%d D7:%d", conf.pin_d0, conf.pin_d1, " Internal: %s\n"
conf.pin_d2, conf.pin_d3, conf.pin_d4, conf.pin_d5, conf.pin_d6, conf.pin_d7); " Data Pins: D0:%d D1:%d D2:%d D3:%d D4:%d D5:%d D6:%d D7:%d\n"
ESP_LOGCONFIG(TAG, " VSYNC Pin: %d", conf.pin_vsync); " VSYNC Pin: %d\n"
ESP_LOGCONFIG(TAG, " HREF Pin: %d", conf.pin_href); " HREF Pin: %d\n"
ESP_LOGCONFIG(TAG, " Pixel Clock Pin: %d", conf.pin_pclk); " Pixel Clock Pin: %d\n"
ESP_LOGCONFIG(TAG, " External Clock: Pin:%d Frequency:%u", conf.pin_xclk, conf.xclk_freq_hz); " External Clock: Pin:%d Frequency:%u\n"
ESP_LOGCONFIG(TAG, " I2C Pins: SDA:%d SCL:%d", conf.pin_sccb_sda, conf.pin_sccb_scl); " I2C Pins: SDA:%d SCL:%d\n"
ESP_LOGCONFIG(TAG, " Reset Pin: %d", conf.pin_reset); " Reset Pin: %d",
this->name_.c_str(), YESNO(this->internal_), conf.pin_d0, conf.pin_d1, conf.pin_d2, conf.pin_d3,
conf.pin_d4, conf.pin_d5, conf.pin_d6, conf.pin_d7, conf.pin_vsync, conf.pin_href, conf.pin_pclk,
conf.pin_xclk, conf.xclk_freq_hz, conf.pin_sccb_sda, conf.pin_sccb_scl, conf.pin_reset);
switch (this->config_.frame_size) { switch (this->config_.frame_size) {
case FRAMESIZE_QQVGA: case FRAMESIZE_QQVGA:
ESP_LOGCONFIG(TAG, " Resolution: 160x120 (QQVGA)"); ESP_LOGCONFIG(TAG, " Resolution: 160x120 (QQVGA)");
@ -123,24 +126,29 @@ void ESP32Camera::dump_config() {
sensor_t *s = esp_camera_sensor_get(); sensor_t *s = esp_camera_sensor_get();
auto st = s->status; auto st = s->status;
ESP_LOGCONFIG(TAG, " JPEG Quality: %u", st.quality); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Framebuffer Count: %u", conf.fb_count); " JPEG Quality: %u\n"
ESP_LOGCONFIG(TAG, " Contrast: %d", st.contrast); " Framebuffer Count: %u\n"
ESP_LOGCONFIG(TAG, " Brightness: %d", st.brightness); " Contrast: %d\n"
ESP_LOGCONFIG(TAG, " Saturation: %d", st.saturation); " Brightness: %d\n"
ESP_LOGCONFIG(TAG, " Vertical Flip: %s", ONOFF(st.vflip)); " Saturation: %d\n"
ESP_LOGCONFIG(TAG, " Horizontal Mirror: %s", ONOFF(st.hmirror)); " Vertical Flip: %s\n"
ESP_LOGCONFIG(TAG, " Special Effect: %u", st.special_effect); " Horizontal Mirror: %s\n"
ESP_LOGCONFIG(TAG, " White Balance Mode: %u", st.wb_mode); " Special Effect: %u\n"
" White Balance Mode: %u",
st.quality, conf.fb_count, st.contrast, st.brightness, st.saturation, ONOFF(st.vflip),
ONOFF(st.hmirror), st.special_effect, st.wb_mode);
// ESP_LOGCONFIG(TAG, " Auto White Balance: %u", st.awb); // ESP_LOGCONFIG(TAG, " Auto White Balance: %u", st.awb);
// ESP_LOGCONFIG(TAG, " Auto White Balance Gain: %u", st.awb_gain); // ESP_LOGCONFIG(TAG, " Auto White Balance Gain: %u", st.awb_gain);
ESP_LOGCONFIG(TAG, " Auto Exposure Control: %u", st.aec); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Auto Exposure Control 2: %u", st.aec2); " Auto Exposure Control: %u\n"
ESP_LOGCONFIG(TAG, " Auto Exposure Level: %d", st.ae_level); " Auto Exposure Control 2: %u\n"
ESP_LOGCONFIG(TAG, " Auto Exposure Value: %u", st.aec_value); " Auto Exposure Level: %d\n"
ESP_LOGCONFIG(TAG, " AGC: %u", st.agc); " Auto Exposure Value: %u\n"
ESP_LOGCONFIG(TAG, " AGC Gain: %u", st.agc_gain); " AGC: %u\n"
ESP_LOGCONFIG(TAG, " Gain Ceiling: %u", st.gainceiling); " AGC Gain: %u\n"
" Gain Ceiling: %u",
st.aec, st.aec2, st.ae_level, st.aec_value, st.agc, st.agc_gain, st.gainceiling);
// ESP_LOGCONFIG(TAG, " BPC: %u", st.bpc); // ESP_LOGCONFIG(TAG, " BPC: %u", st.bpc);
// ESP_LOGCONFIG(TAG, " WPC: %u", st.wpc); // ESP_LOGCONFIG(TAG, " WPC: %u", st.wpc);
// ESP_LOGCONFIG(TAG, " RAW_GMA: %u", st.raw_gma); // ESP_LOGCONFIG(TAG, " RAW_GMA: %u", st.raw_gma);

View File

@ -85,8 +85,10 @@ void CameraWebServer::on_shutdown() {
} }
void CameraWebServer::dump_config() { void CameraWebServer::dump_config() {
ESP_LOGCONFIG(TAG, "ESP32 Camera Web Server:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Port: %d", this->port_); "ESP32 Camera Web Server:\n"
" Port: %d",
this->port_);
if (this->mode_ == STREAM) { if (this->mode_ == STREAM) {
ESP_LOGCONFIG(TAG, " Mode: stream"); ESP_LOGCONFIG(TAG, " Mode: stream");
} else { } else {

View File

@ -247,8 +247,10 @@ light::ESPColorView ESP32RMTLEDStripLightOutput::get_view_internal(int32_t index
} }
void ESP32RMTLEDStripLightOutput::dump_config() { void ESP32RMTLEDStripLightOutput::dump_config() {
ESP_LOGCONFIG(TAG, "ESP32 RMT LED Strip:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Pin: %u", this->pin_); "ESP32 RMT LED Strip:\n"
" Pin: %u",
this->pin_);
#if ESP_IDF_VERSION_MAJOR >= 5 #if ESP_IDF_VERSION_MAJOR >= 5
ESP_LOGCONFIG(TAG, " RMT Symbols: %" PRIu32, this->rmt_symbols_); ESP_LOGCONFIG(TAG, " RMT Symbols: %" PRIu32, this->rmt_symbols_);
#else #else
@ -278,9 +280,11 @@ void ESP32RMTLEDStripLightOutput::dump_config() {
rgb_order = "UNKNOWN"; rgb_order = "UNKNOWN";
break; break;
} }
ESP_LOGCONFIG(TAG, " RGB Order: %s", rgb_order); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max refresh rate: %" PRIu32, *this->max_refresh_rate_); " RGB Order: %s\n"
ESP_LOGCONFIG(TAG, " Number of LEDs: %u", this->num_leds_); " Max refresh rate: %" PRIu32 "\n"
" Number of LEDs: %u",
rgb_order, *this->max_refresh_rate_, this->num_leds_);
} }
float ESP32RMTLEDStripLightOutput::get_setup_priority() const { return setup_priority::HARDWARE; } float ESP32RMTLEDStripLightOutput::get_setup_priority() const { return setup_priority::HARDWARE; }

View File

@ -75,9 +75,11 @@ void ESP32TouchComponent::setup() {
} }
void ESP32TouchComponent::dump_config() { void ESP32TouchComponent::dump_config() {
ESP_LOGCONFIG(TAG, "Config for ESP32 Touch Hub:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Meas cycle: %.2fms", this->meas_cycle_ / (8000000.0f / 1000.0f)); "Config for ESP32 Touch Hub:\n"
ESP_LOGCONFIG(TAG, " Sleep cycle: %.2fms", this->sleep_cycle_ / (150000.0f / 1000.0f)); " Meas cycle: %.2fms\n"
" Sleep cycle: %.2fms",
this->meas_cycle_ / (8000000.0f / 1000.0f), this->sleep_cycle_ / (150000.0f / 1000.0f));
const char *lv_s; const char *lv_s;
switch (this->low_voltage_reference_) { switch (this->low_voltage_reference_) {
@ -171,10 +173,12 @@ void ESP32TouchComponent::dump_config() {
filter_mode_s = "UNKNOWN"; filter_mode_s = "UNKNOWN";
break; break;
} }
ESP_LOGCONFIG(TAG, " Filter mode: %s", filter_mode_s); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Debounce count: %" PRIu32, this->debounce_count_); " Filter mode: %s\n"
ESP_LOGCONFIG(TAG, " Noise threshold coefficient: %" PRIu32, this->noise_threshold_); " Debounce count: %" PRIu32 "\n"
ESP_LOGCONFIG(TAG, " Jitter filter step size: %" PRIu32, this->jitter_step_); " Noise threshold coefficient: %" PRIu32 "\n"
" Jitter filter step size: %" PRIu32,
filter_mode_s, this->debounce_count_, this->noise_threshold_, this->jitter_step_);
const char *smooth_level_s; const char *smooth_level_s;
switch (this->smooth_level_) { switch (this->smooth_level_) {
case TOUCH_PAD_SMOOTH_OFF: case TOUCH_PAD_SMOOTH_OFF:

View File

@ -70,9 +70,11 @@ void ESPHomeOTAComponent::setup() {
} }
void ESPHomeOTAComponent::dump_config() { void ESPHomeOTAComponent::dump_config() {
ESP_LOGCONFIG(TAG, "Over-The-Air updates:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Address: %s:%u", network::get_use_address().c_str(), this->port_); "Over-The-Air updates:\n"
ESP_LOGCONFIG(TAG, " Version: %d", USE_OTA_VERSION); " Address: %s:%u\n"
" Version: %d",
network::get_use_address().c_str(), this->port_, USE_OTA_VERSION);
#ifdef USE_OTA_PASSWORD #ifdef USE_OTA_PASSWORD
if (!this->password_.empty()) { if (!this->password_.empty()) {
ESP_LOGCONFIG(TAG, " Password configured"); ESP_LOGCONFIG(TAG, " Password configured");

View File

@ -326,10 +326,12 @@ void EthernetComponent::dump_config() {
ESP_LOGCONFIG(TAG, "Ethernet:"); ESP_LOGCONFIG(TAG, "Ethernet:");
this->dump_connect_params_(); this->dump_connect_params_();
#ifdef USE_ETHERNET_SPI #ifdef USE_ETHERNET_SPI
ESP_LOGCONFIG(TAG, " CLK Pin: %u", this->clk_pin_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " MISO Pin: %u", this->miso_pin_); " CLK Pin: %u\n"
ESP_LOGCONFIG(TAG, " MOSI Pin: %u", this->mosi_pin_); " MISO Pin: %u\n"
ESP_LOGCONFIG(TAG, " CS Pin: %u", this->cs_pin_); " MOSI Pin: %u\n"
" CS Pin: %u",
this->clk_pin_, this->miso_pin_, this->mosi_pin_, this->cs_pin_);
#ifdef USE_ETHERNET_SPI_POLLING_SUPPORT #ifdef USE_ETHERNET_SPI_POLLING_SUPPORT
if (this->polling_interval_ != 0) { if (this->polling_interval_ != 0) {
ESP_LOGCONFIG(TAG, " Polling Interval: %lu ms", this->polling_interval_); ESP_LOGCONFIG(TAG, " Polling Interval: %lu ms", this->polling_interval_);
@ -338,15 +340,19 @@ void EthernetComponent::dump_config() {
{ {
ESP_LOGCONFIG(TAG, " IRQ Pin: %d", this->interrupt_pin_); ESP_LOGCONFIG(TAG, " IRQ Pin: %d", this->interrupt_pin_);
} }
ESP_LOGCONFIG(TAG, " Reset Pin: %d", this->reset_pin_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Clock Speed: %d MHz", this->clock_speed_ / 1000000); " Reset Pin: %d\n"
" Clock Speed: %d MHz",
this->reset_pin_, this->clock_speed_ / 1000000);
#else #else
if (this->power_pin_ != -1) { if (this->power_pin_ != -1) {
ESP_LOGCONFIG(TAG, " Power Pin: %u", this->power_pin_); ESP_LOGCONFIG(TAG, " Power Pin: %u", this->power_pin_);
} }
ESP_LOGCONFIG(TAG, " MDC Pin: %u", this->mdc_pin_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " MDIO Pin: %u", this->mdio_pin_); " MDC Pin: %u\n"
ESP_LOGCONFIG(TAG, " PHY addr: %u", this->phy_addr_); " MDIO Pin: %u\n"
" PHY addr: %u",
this->mdc_pin_, this->mdio_pin_, this->phy_addr_);
#endif #endif
ESP_LOGCONFIG(TAG, " Type: %s", eth_type); ESP_LOGCONFIG(TAG, " Type: %s", eth_type);
} }
@ -512,16 +518,19 @@ bool EthernetComponent::is_connected() { return this->state_ == EthernetComponen
void EthernetComponent::dump_connect_params_() { void EthernetComponent::dump_connect_params_() {
esp_netif_ip_info_t ip; esp_netif_ip_info_t ip;
esp_netif_get_ip_info(this->eth_netif_, &ip); esp_netif_get_ip_info(this->eth_netif_, &ip);
ESP_LOGCONFIG(TAG, " IP Address: %s", network::IPAddress(&ip.ip).str().c_str());
ESP_LOGCONFIG(TAG, " Hostname: '%s'", App.get_name().c_str());
ESP_LOGCONFIG(TAG, " Subnet: %s", network::IPAddress(&ip.netmask).str().c_str());
ESP_LOGCONFIG(TAG, " Gateway: %s", network::IPAddress(&ip.gw).str().c_str());
const ip_addr_t *dns_ip1 = dns_getserver(0); const ip_addr_t *dns_ip1 = dns_getserver(0);
const ip_addr_t *dns_ip2 = dns_getserver(1); const ip_addr_t *dns_ip2 = dns_getserver(1);
ESP_LOGCONFIG(TAG, " DNS1: %s", network::IPAddress(dns_ip1).str().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " DNS2: %s", network::IPAddress(dns_ip2).str().c_str()); " IP Address: %s\n"
" Hostname: '%s'\n"
" Subnet: %s\n"
" Gateway: %s\n"
" DNS1: %s\n"
" DNS2: %s",
network::IPAddress(&ip.ip).str().c_str(), App.get_name().c_str(),
network::IPAddress(&ip.netmask).str().c_str(), network::IPAddress(&ip.gw).str().c_str(),
network::IPAddress(dns_ip1).str().c_str(), network::IPAddress(dns_ip2).str().c_str());
#if USE_NETWORK_IPV6 #if USE_NETWORK_IPV6
struct esp_ip6_addr if_ip6s[CONFIG_LWIP_IPV6_NUM_ADDRESSES]; struct esp_ip6_addr if_ip6s[CONFIG_LWIP_IPV6_NUM_ADDRESSES];
@ -533,9 +542,12 @@ void EthernetComponent::dump_connect_params_() {
} }
#endif /* USE_NETWORK_IPV6 */ #endif /* USE_NETWORK_IPV6 */
ESP_LOGCONFIG(TAG, " MAC Address: %s", this->get_eth_mac_address_pretty().c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Is Full Duplex: %s", YESNO(this->get_duplex_mode() == ETH_DUPLEX_FULL)); " MAC Address: %s\n"
ESP_LOGCONFIG(TAG, " Link Speed: %u", this->get_link_speed() == ETH_SPEED_100M ? 100 : 10); " Is Full Duplex: %s\n"
" Link Speed: %u",
this->get_eth_mac_address_pretty().c_str(), YESNO(this->get_duplex_mode() == ETH_DUPLEX_FULL),
this->get_link_speed() == ETH_SPEED_100M ? 100 : 10);
} }
#ifdef USE_ETHERNET_SPI #ifdef USE_ETHERNET_SPI

View File

@ -189,8 +189,10 @@ void Fan::dump_traits_(const char *tag, const char *prefix) {
auto traits = this->get_traits(); auto traits = this->get_traits();
if (traits.supports_speed()) { if (traits.supports_speed()) {
ESP_LOGCONFIG(tag, "%s Speed: YES", prefix); ESP_LOGCONFIG(tag,
ESP_LOGCONFIG(tag, "%s Speed count: %d", prefix, traits.supported_speed_count()); "%s Speed: YES\n"
"%s Speed count: %d",
prefix, prefix, traits.supported_speed_count());
} }
if (traits.supports_oscillation()) { if (traits.supports_oscillation()) {
ESP_LOGCONFIG(tag, "%s Oscillation: YES", prefix); ESP_LOGCONFIG(tag, "%s Oscillation: YES", prefix);

View File

@ -18,9 +18,11 @@ void FastLEDLightOutput::setup() {
} }
} }
void FastLEDLightOutput::dump_config() { void FastLEDLightOutput::dump_config() {
ESP_LOGCONFIG(TAG, "FastLED light:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Num LEDs: %u", this->num_leds_); "FastLED light:\n"
ESP_LOGCONFIG(TAG, " Max refresh rate: %u", *this->max_refresh_rate_); " Num LEDs: %u\n"
" Max refresh rate: %u",
this->num_leds_, *this->max_refresh_rate_);
} }
void FastLEDLightOutput::write_state(light::LightState *state) { void FastLEDLightOutput::write_state(light::LightState *state) {
// protect from refreshing too often // protect from refreshing too often

View File

@ -534,11 +534,13 @@ void FingerprintGrowComponent::sensor_sleep_() {
} }
void FingerprintGrowComponent::dump_config() { void FingerprintGrowComponent::dump_config() {
ESP_LOGCONFIG(TAG, "GROW_FINGERPRINT_READER:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " System Identifier Code: 0x%.4X", this->system_identifier_code_); "GROW_FINGERPRINT_READER:\n"
ESP_LOGCONFIG(TAG, " Touch Sensing Pin: %s", " System Identifier Code: 0x%.4X\n"
this->has_sensing_pin_ ? this->sensing_pin_->dump_summary().c_str() : "None"); " Touch Sensing Pin: %s\n"
ESP_LOGCONFIG(TAG, " Sensor Power Pin: %s", " Sensor Power Pin: %s",
this->system_identifier_code_,
this->has_sensing_pin_ ? this->sensing_pin_->dump_summary().c_str() : "None",
this->has_power_pin_ ? this->sensor_power_pin_->dump_summary().c_str() : "None"); this->has_power_pin_ ? this->sensor_power_pin_->dump_summary().c_str() : "None");
if (this->idle_period_to_sleep_ms_ < UINT32_MAX) { if (this->idle_period_to_sleep_ms_ < UINT32_MAX) {
ESP_LOGCONFIG(TAG, " Idle Period to Sleep: %" PRIu32 " ms", this->idle_period_to_sleep_ms_); ESP_LOGCONFIG(TAG, " Idle Period to Sleep: %" PRIu32 " ms", this->idle_period_to_sleep_ms_);

View File

@ -81,9 +81,11 @@ void FT5x06Touchscreen::update_touches() {
} }
void FT5x06Touchscreen::dump_config() { void FT5x06Touchscreen::dump_config() {
ESP_LOGCONFIG(TAG, "FT5x06 Touchscreen:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Address: 0x%02X", this->address_); "FT5x06 Touchscreen:\n"
ESP_LOGCONFIG(TAG, " Vendor ID: 0x%X", (int) this->vendor_id_); " Address: 0x%02X\n"
" Vendor ID: 0x%X",
this->address_, (int) this->vendor_id_);
} }
bool FT5x06Touchscreen::err_check_(i2c::ErrorCode err, const char *msg) { bool FT5x06Touchscreen::err_check_(i2c::ErrorCode err, const char *msg) {

View File

@ -71,8 +71,10 @@ void FT63X6Touchscreen::dump_config() {
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_); LOG_PIN(" Interrupt Pin: ", this->interrupt_pin_);
LOG_PIN(" Reset Pin: ", this->reset_pin_); LOG_PIN(" Reset Pin: ", this->reset_pin_);
ESP_LOGCONFIG(TAG, " X Calibration: [%d, %d]", this->x_raw_min_, this->x_raw_max_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Y Calibration: [%d, %d]", this->y_raw_min_, this->y_raw_max_); " X Calibration: [%d, %d]\n"
" Y Calibration: [%d, %d]",
this->x_raw_min_, this->x_raw_max_, this->y_raw_min_, this->y_raw_max_);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -13,8 +13,10 @@ static const float MAX_VOLTAGE = 4.0f;
void GP2Y1010AU0FSensor::dump_config() { void GP2Y1010AU0FSensor::dump_config() {
LOG_SENSOR("", "Sharp GP2Y1010AU0F PM2.5 Sensor", this); LOG_SENSOR("", "Sharp GP2Y1010AU0F PM2.5 Sensor", this);
ESP_LOGCONFIG(TAG, " Sampling duration: %" PRId32 " ms", this->sample_duration_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " ADC voltage multiplier: %.3f", this->voltage_multiplier_); " Sampling duration: %" PRId32 " ms\n"
" ADC voltage multiplier: %.3f",
this->sample_duration_, this->voltage_multiplier_);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -12,8 +12,10 @@ static const uint8_t RANGE_REGISTER = 0x01;
void GP8403::setup() { this->write_register(RANGE_REGISTER, (uint8_t *) (&this->voltage_), 1); } void GP8403::setup() { this->write_register(RANGE_REGISTER, (uint8_t *) (&this->voltage_), 1); }
void GP8403::dump_config() { void GP8403::dump_config() {
ESP_LOGCONFIG(TAG, "GP8403:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Voltage: %dV", this->voltage_ == GP8403_VOLTAGE_5V ? 5 : 10); "GP8403:\n"
" Voltage: %dV",
this->voltage_ == GP8403_VOLTAGE_5V ? 5 : 10);
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
} }

View File

@ -10,8 +10,10 @@ static const char *const TAG = "gp8403.output";
static const uint8_t OUTPUT_REGISTER = 0x02; static const uint8_t OUTPUT_REGISTER = 0x02;
void GP8403Output::dump_config() { void GP8403Output::dump_config() {
ESP_LOGCONFIG(TAG, "GP8403 Output:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Channel: %u", this->channel_); "GP8403 Output:\n"
" Channel: %u",
this->channel_);
} }
void GP8403Output::write_state(float state) { void GP8403Output::write_state(float state) {

View File

@ -36,14 +36,18 @@ void GraphicalDisplayMenu::setup() {
} }
void GraphicalDisplayMenu::dump_config() { void GraphicalDisplayMenu::dump_config() {
ESP_LOGCONFIG(TAG, "Graphical Display Menu"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, "Has Display: %s", YESNO(this->display_ != nullptr)); "Graphical Display Menu\n"
ESP_LOGCONFIG(TAG, "Popup Mode: %s", YESNO(this->display_ != nullptr)); "Has Display: %s\n"
ESP_LOGCONFIG(TAG, "Advanced Drawing Mode: %s", YESNO(this->display_ == nullptr)); "Popup Mode: %s\n"
ESP_LOGCONFIG(TAG, "Has Font: %s", YESNO(this->font_ != nullptr)); "Advanced Drawing Mode: %s\n"
ESP_LOGCONFIG(TAG, "Mode: %s", this->mode_ == display_menu_base::MENU_MODE_ROTARY ? "Rotary" : "Joystick"); "Has Font: %s\n"
ESP_LOGCONFIG(TAG, "Active: %s", YESNO(this->active_)); "Mode: %s\n"
ESP_LOGCONFIG(TAG, "Menu items:"); "Active: %s\n"
"Menu items:",
YESNO(this->display_ != nullptr), YESNO(this->display_ != nullptr), YESNO(this->display_ == nullptr),
YESNO(this->font_ != nullptr),
this->mode_ == display_menu_base::MENU_MODE_ROTARY ? "Rotary" : "Joystick", YESNO(this->active_));
for (size_t i = 0; i < this->displayed_item_->items_size(); i++) { for (size_t i = 0; i < this->displayed_item_->items_size(); i++) {
auto *item = this->displayed_item_->get_item(i); auto *item = this->displayed_item_->get_item(i);
ESP_LOGCONFIG(TAG, " %i: %s (Type: %s, Immediate Edit: %s)", i, item->get_text().c_str(), ESP_LOGCONFIG(TAG, " %i: %s (Type: %s, Immediate Edit: %s)", i, item->get_text().c_str(),

View File

@ -134,8 +134,10 @@ void GrowattSolar::on_modbus_data(const std::vector<uint8_t> &data) {
} }
void GrowattSolar::dump_config() { void GrowattSolar::dump_config() {
ESP_LOGCONFIG(TAG, "GROWATT Solar:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Address: 0x%02X", this->address_); "GROWATT Solar:\n"
" Address: 0x%02X",
this->address_);
} }
} // namespace growatt_solar } // namespace growatt_solar

View File

@ -339,13 +339,20 @@ void HonClimate::set_handlers() {
void HonClimate::dump_config() { void HonClimate::dump_config() {
HaierClimateBase::dump_config(); HaierClimateBase::dump_config();
ESP_LOGCONFIG(TAG, " Protocol version: hOn"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Control method: %d", (uint8_t) this->control_method_); " Protocol version: hOn\n"
" Control method: %d",
(uint8_t) this->control_method_);
if (this->hvac_hardware_info_.has_value()) { if (this->hvac_hardware_info_.has_value()) {
ESP_LOGCONFIG(TAG, " Device protocol version: %s", this->hvac_hardware_info_.value().protocol_version_.c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Device software version: %s", this->hvac_hardware_info_.value().software_version_.c_str()); " Device protocol version: %s\n"
ESP_LOGCONFIG(TAG, " Device hardware version: %s", this->hvac_hardware_info_.value().hardware_version_.c_str()); " Device software version: %s\n"
ESP_LOGCONFIG(TAG, " Device name: %s", this->hvac_hardware_info_.value().device_name_.c_str()); " Device hardware version: %s\n"
" Device name: %s",
this->hvac_hardware_info_.value().protocol_version_.c_str(),
this->hvac_hardware_info_.value().software_version_.c_str(),
this->hvac_hardware_info_.value().hardware_version_.c_str(),
this->hvac_hardware_info_.value().device_name_.c_str());
ESP_LOGCONFIG(TAG, " Device features:%s%s%s%s%s", ESP_LOGCONFIG(TAG, " Device features:%s%s%s%s%s",
(this->hvac_hardware_info_.value().functions_[0] ? " interactive" : ""), (this->hvac_hardware_info_.value().functions_[0] ? " interactive" : ""),
(this->hvac_hardware_info_.value().functions_[1] ? " controller-device" : ""), (this->hvac_hardware_info_.value().functions_[1] ? " controller-device" : ""),

View File

@ -123,8 +123,10 @@ void HavellsSolar::on_modbus_data(const std::vector<uint8_t> &data) {
void HavellsSolar::update() { this->send(MODBUS_CMD_READ_IN_REGISTERS, 0, MODBUS_REGISTER_COUNT); } void HavellsSolar::update() { this->send(MODBUS_CMD_READ_IN_REGISTERS, 0, MODBUS_REGISTER_COUNT); }
void HavellsSolar::dump_config() { void HavellsSolar::dump_config() {
ESP_LOGCONFIG(TAG, "HAVELLS Solar:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Address: 0x%02X", this->address_); "HAVELLS Solar:\n"
" Address: 0x%02X",
this->address_);
for (uint8_t i = 0; i < 3; i++) { for (uint8_t i = 0; i < 3; i++) {
auto phase = this->phases_[i]; auto phase = this->phases_[i];
if (!phase.setup) if (!phase.setup)

View File

@ -40,8 +40,10 @@ CoverTraits HE60rCover::get_traits() {
void HE60rCover::dump_config() { void HE60rCover::dump_config() {
LOG_COVER("", "HE60R Cover", this); LOG_COVER("", "HE60R Cover", this);
this->check_uart_settings(1200, 1, uart::UART_CONFIG_PARITY_EVEN, 8); this->check_uart_settings(1200, 1, uart::UART_CONFIG_PARITY_EVEN, 8);
ESP_LOGCONFIG(TAG, " Open Duration: %.1fs", this->open_duration_ / 1e3f); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Close Duration: %.1fs", this->close_duration_ / 1e3f); " Open Duration: %.1fs\n"
" Close Duration: %.1fs",
this->open_duration_ / 1e3f, this->close_duration_ / 1e3f);
auto restore = this->restore_state_(); auto restore = this->restore_state_();
if (restore.has_value()) if (restore.has_value())
ESP_LOGCONFIG(TAG, " Saved position %d%%", (int) (restore->position * 100.f)); ESP_LOGCONFIG(TAG, " Saved position %d%%", (int) (restore->position * 100.f));

View File

@ -38,9 +38,11 @@ void HLW8012Component::dump_config() {
LOG_PIN(" SEL Pin: ", this->sel_pin_) LOG_PIN(" SEL Pin: ", this->sel_pin_)
LOG_PIN(" CF Pin: ", this->cf_pin_) LOG_PIN(" CF Pin: ", this->cf_pin_)
LOG_PIN(" CF1 Pin: ", this->cf1_pin_) LOG_PIN(" CF1 Pin: ", this->cf1_pin_)
ESP_LOGCONFIG(TAG, " Change measurement mode every %" PRIu32, this->change_mode_every_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Current resistor: %.1f mΩ", this->current_resistor_ * 1000.0f); " Change measurement mode every %" PRIu32 "\n"
ESP_LOGCONFIG(TAG, " Voltage Divider: %.1f", this->voltage_divider_); " Current resistor: %.1f mΩ\n"
" Voltage Divider: %.1f",
this->change_mode_every_, this->current_resistor_ * 1000.0f, this->voltage_divider_);
LOG_UPDATE_INTERVAL(this) LOG_UPDATE_INTERVAL(this)
LOG_SENSOR(" ", "Voltage", this->voltage_sensor_) LOG_SENSOR(" ", "Voltage", this->voltage_sensor_)
LOG_SENSOR(" ", "Current", this->current_sensor_) LOG_SENSOR(" ", "Current", this->current_sensor_)

View File

@ -7,8 +7,10 @@ namespace homeassistant {
static const char *const TAG = "homeassistant.time"; static const char *const TAG = "homeassistant.time";
void HomeassistantTime::dump_config() { void HomeassistantTime::dump_config() {
ESP_LOGCONFIG(TAG, "Home Assistant Time:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Timezone: '%s'", this->timezone_.c_str()); "Home Assistant Time:\n"
" Timezone: '%s'",
this->timezone_.c_str());
} }
float HomeassistantTime::get_setup_priority() const { return setup_priority::DATA; } float HomeassistantTime::get_setup_priority() const { return setup_priority::DATA; }

View File

@ -85,8 +85,10 @@ float HONEYWELLABPSensor::get_setup_priority() const { return setup_priority::LA
void HONEYWELLABPSensor::dump_config() { void HONEYWELLABPSensor::dump_config() {
// LOG_SENSOR("", "HONEYWELLABP", this); // LOG_SENSOR("", "HONEYWELLABP", this);
LOG_PIN(" CS Pin: ", this->cs_); LOG_PIN(" CS Pin: ", this->cs_);
ESP_LOGCONFIG(TAG, " Min Pressure Range: %0.1f", honeywellabp_min_pressure_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max Pressure Range: %0.1f", honeywellabp_max_pressure_); " Min Pressure Range: %0.1f\n"
" Max Pressure Range: %0.1f",
honeywellabp_min_pressure_, honeywellabp_max_pressure_);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
} }

View File

@ -84,8 +84,10 @@ void HONEYWELLABP2Sensor::update() {
} }
void HONEYWELLABP2Sensor::dump_config() { void HONEYWELLABP2Sensor::dump_config() {
ESP_LOGCONFIG(TAG, " Min Pressure Range: %0.1f", this->min_pressure_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max Pressure Range: %0.1f", this->max_pressure_); " Min Pressure Range: %0.1f\n"
" Max Pressure Range: %0.1f",
this->min_pressure_, this->max_pressure_);
if (this->transfer_function_ == ABP2_TRANS_FUNC_A) { if (this->transfer_function_ == ABP2_TRANS_FUNC_A) {
ESP_LOGCONFIG(TAG, " Transfer function A"); ESP_LOGCONFIG(TAG, " Transfer function A");
} else { } else {

View File

@ -10,11 +10,13 @@ namespace http_request {
static const char *const TAG = "http_request"; static const char *const TAG = "http_request";
void HttpRequestComponent::dump_config() { void HttpRequestComponent::dump_config() {
ESP_LOGCONFIG(TAG, "HTTP Request:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Timeout: %ums", this->timeout_); "HTTP Request:\n"
ESP_LOGCONFIG(TAG, " User-Agent: %s", this->useragent_); " Timeout: %ums\n"
ESP_LOGCONFIG(TAG, " Follow redirects: %s", YESNO(this->follow_redirects_)); " User-Agent: %s\n"
ESP_LOGCONFIG(TAG, " Redirect limit: %d", this->redirect_limit_); " Follow redirects: %s\n"
" Redirect limit: %d",
this->timeout_, this->useragent_, YESNO(this->follow_redirects_), this->redirect_limit_);
if (this->watchdog_timeout_ > 0) { if (this->watchdog_timeout_ > 0) {
ESP_LOGCONFIG(TAG, " Watchdog Timeout: %" PRIu32 "ms", this->watchdog_timeout_); ESP_LOGCONFIG(TAG, " Watchdog Timeout: %" PRIu32 "ms", this->watchdog_timeout_);
} }

View File

@ -26,8 +26,10 @@ struct UserData {
void HttpRequestIDF::dump_config() { void HttpRequestIDF::dump_config() {
HttpRequestComponent::dump_config(); HttpRequestComponent::dump_config();
ESP_LOGCONFIG(TAG, " Buffer Size RX: %u", this->buffer_size_rx_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Buffer Size TX: %u", this->buffer_size_tx_); " Buffer Size RX: %u\n"
" Buffer Size TX: %u",
this->buffer_size_rx_, this->buffer_size_tx_);
} }
esp_err_t HttpRequestIDF::http_event_handler(esp_http_client_event_t *evt) { esp_err_t HttpRequestIDF::http_event_handler(esp_http_client_event_t *evt) {

View File

@ -18,8 +18,10 @@ void HydreonRGxxComponent::dump_config() {
ESP_LOGE(TAG, "Connection with hydreon_rgxx failed!"); ESP_LOGE(TAG, "Connection with hydreon_rgxx failed!");
} }
if (model_ == RG9) { if (model_ == RG9) {
ESP_LOGCONFIG(TAG, " Model: RG9"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Disable Led: %s", TRUEFALSE(this->disable_led_)); " Model: RG9\n"
" Disable Led: %s",
TRUEFALSE(this->disable_led_));
} else { } else {
ESP_LOGCONFIG(TAG, " Model: RG15"); ESP_LOGCONFIG(TAG, " Model: RG15");
if (this->resolution_ == FORCE_HIGH) { if (this->resolution_ == FORCE_HIGH) {

View File

@ -70,9 +70,11 @@ void ArduinoI2CBus::set_pins_and_clock_() {
void ArduinoI2CBus::dump_config() { void ArduinoI2CBus::dump_config() {
ESP_LOGCONFIG(TAG, "I2C Bus:"); ESP_LOGCONFIG(TAG, "I2C Bus:");
ESP_LOGCONFIG(TAG, " SDA Pin: GPIO%u", this->sda_pin_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " SCL Pin: GPIO%u", this->scl_pin_); " SDA Pin: GPIO%u\n"
ESP_LOGCONFIG(TAG, " Frequency: %u Hz", this->frequency_); " SCL Pin: GPIO%u\n"
" Frequency: %u Hz",
this->sda_pin_, this->scl_pin_, this->frequency_);
if (timeout_ > 0) { if (timeout_ > 0) {
#if defined(USE_ESP32) #if defined(USE_ESP32)
ESP_LOGCONFIG(TAG, " Timeout: %u ms", this->timeout_ / 1000); ESP_LOGCONFIG(TAG, " Timeout: %u ms", this->timeout_ / 1000);

View File

@ -81,9 +81,11 @@ void IDFI2CBus::setup() {
} }
void IDFI2CBus::dump_config() { void IDFI2CBus::dump_config() {
ESP_LOGCONFIG(TAG, "I2C Bus:"); ESP_LOGCONFIG(TAG, "I2C Bus:");
ESP_LOGCONFIG(TAG, " SDA Pin: GPIO%u", this->sda_pin_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " SCL Pin: GPIO%u", this->scl_pin_); " SDA Pin: GPIO%u\n"
ESP_LOGCONFIG(TAG, " Frequency: %" PRIu32 " Hz", this->frequency_); " SCL Pin: GPIO%u\n"
" Frequency: %" PRIu32 " Hz",
this->sda_pin_, this->scl_pin_, this->frequency_);
if (timeout_ > 0) { if (timeout_ > 0) {
ESP_LOGCONFIG(TAG, " Timeout: %" PRIu32 "us", this->timeout_); ESP_LOGCONFIG(TAG, " Timeout: %" PRIu32 "us", this->timeout_);
} }

View File

@ -244,8 +244,10 @@ void I2SAudioMediaPlayer::dump_config() {
} }
} else { } else {
#endif #endif
ESP_LOGCONFIG(TAG, " External DAC channels: %d", this->external_dac_channels_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " I2S DOUT Pin: %d", this->dout_pin_); " External DAC channels: %d\n"
" I2S DOUT Pin: %d",
this->external_dac_channels_, this->dout_pin_);
LOG_PIN(" Mute Pin: ", this->mute_pin_); LOG_PIN(" Mute Pin: ", this->mute_pin_);
#if SOC_I2S_SUPPORTS_DAC #if SOC_I2S_SUPPORTS_DAC
} }

View File

@ -89,8 +89,10 @@ void ILI9XXXDisplay::setup_pins_() {
void ILI9XXXDisplay::dump_config() { void ILI9XXXDisplay::dump_config() {
LOG_DISPLAY("", "ili9xxx", this); LOG_DISPLAY("", "ili9xxx", this);
ESP_LOGCONFIG(TAG, " Width Offset: %u", this->offset_x_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Height Offset: %u", this->offset_y_); " Width Offset: %u\n"
" Height Offset: %u",
this->offset_x_, this->offset_y_);
switch (this->buffer_color_mode_) { switch (this->buffer_color_mode_) {
case BITS_8_INDEXED: case BITS_8_INDEXED:
ESP_LOGCONFIG(TAG, " Color mode: 8bit Indexed"); ESP_LOGCONFIG(TAG, " Color mode: 8bit Indexed");
@ -111,11 +113,14 @@ void ILI9XXXDisplay::dump_config() {
LOG_PIN(" CS Pin: ", this->cs_); LOG_PIN(" CS Pin: ", this->cs_);
LOG_PIN(" DC Pin: ", this->dc_pin_); LOG_PIN(" DC Pin: ", this->dc_pin_);
LOG_PIN(" Busy Pin: ", this->busy_pin_); LOG_PIN(" Busy Pin: ", this->busy_pin_);
ESP_LOGCONFIG(TAG, " Color order: %s", this->color_order_ == display::COLOR_ORDER_BGR ? "BGR" : "RGB"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Swap_xy: %s", YESNO(this->swap_xy_)); " Color order: %s\n"
ESP_LOGCONFIG(TAG, " Mirror_x: %s", YESNO(this->mirror_x_)); " Swap_xy: %s\n"
ESP_LOGCONFIG(TAG, " Mirror_y: %s", YESNO(this->mirror_y_)); " Mirror_x: %s\n"
ESP_LOGCONFIG(TAG, " Invert colors: %s", YESNO(this->pre_invertcolors_)); " Mirror_y: %s\n"
" Invert colors: %s",
this->color_order_ == display::COLOR_ORDER_BGR ? "BGR" : "RGB", YESNO(this->swap_xy_),
YESNO(this->mirror_x_), YESNO(this->mirror_y_), YESNO(this->pre_invertcolors_));
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGCONFIG(TAG, " => Failed to init Memory: YES!"); ESP_LOGCONFIG(TAG, " => Failed to init Memory: YES!");

View File

@ -93,9 +93,12 @@ void INA226Component::dump_config() {
} }
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
ESP_LOGCONFIG(TAG, " ADC Conversion Time Bus Voltage: %d", INA226_ADC_TIMES[this->adc_time_voltage_ & 0b111]); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " ADC Conversion Time Shunt Voltage: %d", INA226_ADC_TIMES[this->adc_time_current_ & 0b111]); " ADC Conversion Time Bus Voltage: %d\n"
ESP_LOGCONFIG(TAG, " ADC Averaging Samples: %d", INA226_ADC_AVG_SAMPLES[this->adc_avg_samples_ & 0b111]); " ADC Conversion Time Shunt Voltage: %d\n"
" ADC Averaging Samples: %d",
INA226_ADC_TIMES[this->adc_time_voltage_ & 0b111], INA226_ADC_TIMES[this->adc_time_current_ & 0b111],
INA226_ADC_AVG_SAMPLES[this->adc_avg_samples_ & 0b111]);
LOG_SENSOR(" ", "Bus Voltage", this->bus_voltage_sensor_); LOG_SENSOR(" ", "Bus Voltage", this->bus_voltage_sensor_);
LOG_SENSOR(" ", "Shunt Voltage", this->shunt_voltage_sensor_); LOG_SENSOR(" ", "Shunt Voltage", this->shunt_voltage_sensor_);

View File

@ -206,12 +206,16 @@ void INA2XX::dump_config() {
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL); ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
} }
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
ESP_LOGCONFIG(TAG, " Shunt resistance = %f Ohm", this->shunt_resistance_ohm_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max current = %f A", this->max_current_a_); " Shunt resistance = %f Ohm\n"
ESP_LOGCONFIG(TAG, " Shunt temp coeff = %d ppm/°C", this->shunt_tempco_ppm_c_); " Max current = %f A\n"
ESP_LOGCONFIG(TAG, " ADCRANGE = %d (%s)", (uint8_t) this->adc_range_, this->adc_range_ ? "±40.96 mV" : "±163.84 mV"); " Shunt temp coeff = %d ppm/°C\n"
ESP_LOGCONFIG(TAG, " CURRENT_LSB = %f", this->current_lsb_); " ADCRANGE = %d (%s)\n"
ESP_LOGCONFIG(TAG, " SHUNT_CAL = %d", this->shunt_cal_); " CURRENT_LSB = %f\n"
" SHUNT_CAL = %d",
this->shunt_resistance_ohm_, this->max_current_a_, this->shunt_tempco_ppm_c_,
(uint8_t) this->adc_range_, this->adc_range_ ? "±40.96 mV" : "±163.84 mV", this->current_lsb_,
this->shunt_cal_);
ESP_LOGCONFIG(TAG, " ADC Samples = %d; ADC times: Bus = %d μs, Shunt = %d μs, Temp = %d μs", ESP_LOGCONFIG(TAG, " ADC Samples = %d; ADC times: Bus = %d μs, Shunt = %d μs, Temp = %d μs",
ADC_SAMPLES[0b111 & (uint8_t) this->adc_avg_samples_], ADC_SAMPLES[0b111 & (uint8_t) this->adc_avg_samples_],

View File

@ -186,9 +186,11 @@ void HOT Inkplate6::draw_absolute_pixel_internal(int x, int y, Color color) {
void Inkplate6::dump_config() { void Inkplate6::dump_config() {
LOG_DISPLAY("", "Inkplate", this); LOG_DISPLAY("", "Inkplate", this);
ESP_LOGCONFIG(TAG, " Greyscale: %s", YESNO(this->greyscale_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Partial Updating: %s", YESNO(this->partial_updating_)); " Greyscale: %s\n"
ESP_LOGCONFIG(TAG, " Full Update Every: %d", this->full_update_every_); " Partial Updating: %s\n"
" Full Update Every: %d",
YESNO(this->greyscale_), YESNO(this->partial_updating_), this->full_update_every_);
// Log pins // Log pins
LOG_PIN(" CKV Pin: ", this->ckv_pin_); LOG_PIN(" CKV Pin: ", this->ckv_pin_);
LOG_PIN(" CL Pin: ", this->cl_pin_); LOG_PIN(" CL Pin: ", this->cl_pin_);

View File

@ -32,8 +32,10 @@ void KeyCollector::dump_config() {
if (!this->start_keys_.empty()) if (!this->start_keys_.empty())
ESP_LOGCONFIG(TAG, " start keys '%s'", this->start_keys_.c_str()); ESP_LOGCONFIG(TAG, " start keys '%s'", this->start_keys_.c_str());
if (!this->end_keys_.empty()) { if (!this->end_keys_.empty()) {
ESP_LOGCONFIG(TAG, " end keys '%s'", this->end_keys_.c_str()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " end key is required: %s", ONOFF(this->end_key_required_)); " end keys '%s'\n"
" end key is required: %s",
this->end_keys_.c_str(), ONOFF(this->end_key_required_));
} }
if (!this->allowed_keys_.empty()) if (!this->allowed_keys_.empty())
ESP_LOGCONFIG(TAG, " allowed keys '%s'", this->allowed_keys_.c_str()); ESP_LOGCONFIG(TAG, " allowed keys '%s'", this->allowed_keys_.c_str());

View File

@ -77,8 +77,10 @@ void Kuntze::loop() {
void Kuntze::update() { this->state_ = 1; } void Kuntze::update() { this->state_ = 1; }
void Kuntze::dump_config() { void Kuntze::dump_config() {
ESP_LOGCONFIG(TAG, "Kuntze:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Address: 0x%02X", this->address_); "Kuntze:\n"
" Address: 0x%02X",
this->address_);
LOG_SENSOR("", "pH", this->ph_sensor_); LOG_SENSOR("", "pH", this->ph_sensor_);
LOG_SENSOR("", "temperature", this->temperature_sensor_); LOG_SENSOR("", "temperature", this->temperature_sensor_);
LOG_SENSOR("", "DIS1", this->dis1_sensor_); LOG_SENSOR("", "DIS1", this->dis1_sensor_);

View File

@ -151,8 +151,10 @@ void Lc709203f::dump_config() {
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
ESP_LOGCONFIG(TAG, " Pack Size: %d mAH", this->pack_size_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Pack APA: 0x%02X", this->apa_); " Pack Size: %d mAH\n"
" Pack APA: 0x%02X",
this->pack_size_, this->apa_);
// This is only true if the pack_voltage_ is either 0x0000 or 0x0001. The config validator // This is only true if the pack_voltage_ is either 0x0000 or 0x0001. The config validator
// should have already verified this. // should have already verified this.

View File

@ -24,8 +24,10 @@ void GPIOLCDDisplay::setup() {
LCDDisplay::setup(); LCDDisplay::setup();
} }
void GPIOLCDDisplay::dump_config() { void GPIOLCDDisplay::dump_config() {
ESP_LOGCONFIG(TAG, "GPIO LCD Display:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Columns: %u, Rows: %u", this->columns_, this->rows_); "GPIO LCD Display:\n"
" Columns: %u, Rows: %u",
this->columns_, this->rows_);
LOG_PIN(" RS Pin: ", this->rs_pin_); LOG_PIN(" RS Pin: ", this->rs_pin_);
LOG_PIN(" RW Pin: ", this->rw_pin_); LOG_PIN(" RW Pin: ", this->rw_pin_);
LOG_PIN(" Enable Pin: ", this->enable_pin_); LOG_PIN(" Enable Pin: ", this->enable_pin_);

View File

@ -19,10 +19,12 @@ void LCDCharacterMenuComponent::setup() {
float LCDCharacterMenuComponent::get_setup_priority() const { return setup_priority::PROCESSOR - 1.0f; } float LCDCharacterMenuComponent::get_setup_priority() const { return setup_priority::PROCESSOR - 1.0f; }
void LCDCharacterMenuComponent::dump_config() { void LCDCharacterMenuComponent::dump_config() {
ESP_LOGCONFIG(TAG, "LCD Menu"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Columns: %u, Rows: %u", this->columns_, this->rows_); "LCD Menu\n"
ESP_LOGCONFIG(TAG, " Mark characters: %02x, %02x, %02x, %02x", this->mark_selected_, this->mark_editing_, " Columns: %u, Rows: %u\n"
this->mark_submenu_, this->mark_back_); " Mark characters: %02x, %02x, %02x, %02x",
this->columns_, this->rows_, this->mark_selected_, this->mark_editing_, this->mark_submenu_,
this->mark_back_);
if (this->is_failed()) { if (this->is_failed()) {
ESP_LOGE(TAG, "The connected display failed, the menu is disabled!"); ESP_LOGE(TAG, "The connected display failed, the menu is disabled!");
} }

View File

@ -21,8 +21,10 @@ void PCF8574LCDDisplay::setup() {
LCDDisplay::setup(); LCDDisplay::setup();
} }
void PCF8574LCDDisplay::dump_config() { void PCF8574LCDDisplay::dump_config() {
ESP_LOGCONFIG(TAG, "PCF8574 LCD Display:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Columns: %u, Rows: %u", this->columns_, this->rows_); "PCF8574 LCD Display:\n"
" Columns: %u, Rows: %u",
this->columns_, this->rows_);
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);
if (this->is_failed()) { if (this->is_failed()) {

View File

@ -72,9 +72,11 @@ void LD2410Component::dump_config() {
} }
#endif #endif
this->read_all_info(); this->read_all_info();
ESP_LOGCONFIG(TAG, " Throttle_ : %ums", this->throttle_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " MAC Address : %s", const_cast<char *>(this->mac_.c_str())); " Throttle_ : %ums\n"
ESP_LOGCONFIG(TAG, " Firmware Version : %s", const_cast<char *>(this->version_.c_str())); " MAC Address : %s\n"
" Firmware Version : %s",
this->throttle_, const_cast<char *>(this->mac_.c_str()), const_cast<char *>(this->version_.c_str()));
} }
void LD2410Component::setup() { void LD2410Component::setup() {

View File

@ -65,9 +65,11 @@ static const char *const TAG = "ld2420";
float LD2420Component::get_setup_priority() const { return setup_priority::BUS; } float LD2420Component::get_setup_priority() const { return setup_priority::BUS; }
void LD2420Component::dump_config() { void LD2420Component::dump_config() {
ESP_LOGCONFIG(TAG, "LD2420:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Firmware Version : %7s", this->ld2420_firmware_ver_); "LD2420:\n"
ESP_LOGCONFIG(TAG, "LD2420 Number:"); " Firmware Version : %7s\n"
"LD2420 Number:",
this->ld2420_firmware_ver_);
#ifdef USE_NUMBER #ifdef USE_NUMBER
LOG_NUMBER(TAG, " Gate Timeout:", this->gate_timeout_number_); LOG_NUMBER(TAG, " Gate Timeout:", this->gate_timeout_number_);
LOG_NUMBER(TAG, " Gate Max Distance:", this->max_gate_distance_number_); LOG_NUMBER(TAG, " Gate Max Distance:", this->max_gate_distance_number_);

View File

@ -188,9 +188,11 @@ void LD2450Component::dump_config() {
#ifdef USE_NUMBER #ifdef USE_NUMBER
LOG_NUMBER(" ", "PresenceTimeoutNumber", this->presence_timeout_number_); LOG_NUMBER(" ", "PresenceTimeoutNumber", this->presence_timeout_number_);
#endif #endif
ESP_LOGCONFIG(TAG, " Throttle : %ums", this->throttle_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " MAC Address : %s", const_cast<char *>(this->mac_.c_str())); " Throttle : %ums\n"
ESP_LOGCONFIG(TAG, " Firmware version : %s", const_cast<char *>(this->version_.c_str())); " MAC Address : %s\n"
" Firmware version : %s",
this->throttle_, const_cast<char *>(this->mac_.c_str()), const_cast<char *>(this->version_.c_str()));
} }
void LD2450Component::loop() { void LD2450Component::loop() {

View File

@ -181,10 +181,12 @@ void LEDCOutput::setup() {
void LEDCOutput::dump_config() { void LEDCOutput::dump_config() {
ESP_LOGCONFIG(TAG, "Output:"); ESP_LOGCONFIG(TAG, "Output:");
LOG_PIN(" Pin ", this->pin_); LOG_PIN(" Pin ", this->pin_);
ESP_LOGCONFIG(TAG, " Channel: %u", this->channel_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " PWM Frequency: %.1f Hz", this->frequency_); " Channel: %u\n"
ESP_LOGCONFIG(TAG, " Phase angle: %.1f°", this->phase_angle_); " PWM Frequency: %.1f Hz\n"
ESP_LOGCONFIG(TAG, " Bit depth: %u", this->bit_depth_); " Phase angle: %.1f°\n"
" Bit depth: %u",
this->channel_, this->frequency_, this->phase_angle_, this->bit_depth_);
ESP_LOGV(TAG, " Max frequency for bit depth: %f", ledc_max_frequency_for_bit_depth(this->bit_depth_)); ESP_LOGV(TAG, " Max frequency for bit depth: %f", ledc_max_frequency_for_bit_depth(this->bit_depth_));
ESP_LOGV(TAG, " Min frequency for bit depth: %f", ESP_LOGV(TAG, " Min frequency for bit depth: %f",
ledc_min_frequency_for_bit_depth(this->bit_depth_, (this->frequency_ < 100))); ledc_min_frequency_for_bit_depth(this->bit_depth_, (this->frequency_ < 100)));

View File

@ -91,12 +91,16 @@ void LightState::setup() {
void LightState::dump_config() { void LightState::dump_config() {
ESP_LOGCONFIG(TAG, "Light '%s'", this->get_name().c_str()); ESP_LOGCONFIG(TAG, "Light '%s'", this->get_name().c_str());
if (this->get_traits().supports_color_capability(ColorCapability::BRIGHTNESS)) { if (this->get_traits().supports_color_capability(ColorCapability::BRIGHTNESS)) {
ESP_LOGCONFIG(TAG, " Default Transition Length: %.1fs", this->default_transition_length_ / 1e3f); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Gamma Correct: %.2f", this->gamma_correct_); " Default Transition Length: %.1fs\n"
" Gamma Correct: %.2f",
this->default_transition_length_ / 1e3f, this->gamma_correct_);
} }
if (this->get_traits().supports_color_capability(ColorCapability::COLOR_TEMPERATURE)) { if (this->get_traits().supports_color_capability(ColorCapability::COLOR_TEMPERATURE)) {
ESP_LOGCONFIG(TAG, " Min Mireds: %.1f", this->get_traits().get_min_mireds()); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max Mireds: %.1f", this->get_traits().get_max_mireds()); " Min Mireds: %.1f\n"
" Max Mireds: %.1f",
this->get_traits().get_min_mireds(), this->get_traits().get_max_mireds());
} }
} }
void LightState::loop() { void LightState::loop() {

View File

@ -221,12 +221,16 @@ float Logger::get_setup_priority() const { return setup_priority::BUS + 500.0f;
static const char *const LOG_LEVELS[] = {"NONE", "ERROR", "WARN", "INFO", "CONFIG", "DEBUG", "VERBOSE", "VERY_VERBOSE"}; static const char *const LOG_LEVELS[] = {"NONE", "ERROR", "WARN", "INFO", "CONFIG", "DEBUG", "VERBOSE", "VERY_VERBOSE"};
void Logger::dump_config() { void Logger::dump_config() {
ESP_LOGCONFIG(TAG, "Logger:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Max Level: %s", LOG_LEVELS[ESPHOME_LOG_LEVEL]); "Logger:\n"
ESP_LOGCONFIG(TAG, " Initial Level: %s", LOG_LEVELS[this->current_level_]); " Max Level: %s\n"
" Initial Level: %s",
LOG_LEVELS[ESPHOME_LOG_LEVEL], LOG_LEVELS[this->current_level_]);
#ifndef USE_HOST #ifndef USE_HOST
ESP_LOGCONFIG(TAG, " Log Baud Rate: %" PRIu32, this->baud_rate_); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Hardware UART: %s", get_uart_selection_()); " Log Baud Rate: %" PRIu32 "\n"
" Hardware UART: %s",
this->baud_rate_, get_uart_selection_());
#endif #endif
#ifdef USE_ESPHOME_TASK_LOG_BUFFER #ifdef USE_ESPHOME_TASK_LOG_BUFFER
if (this->log_buffer_) { if (this->log_buffer_) {

View File

@ -187,10 +187,13 @@ void LTR390Component::setup() {
void LTR390Component::dump_config() { void LTR390Component::dump_config() {
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
ESP_LOGCONFIG(TAG, " ALS Gain: X%.0f", GAINVALUES[this->gain_als_]); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " ALS Resolution: %u-bit", RESOLUTION_BITS[this->res_als_]); " ALS Gain: X%.0f\n"
ESP_LOGCONFIG(TAG, " UV Gain: X%.0f", GAINVALUES[this->gain_uv_]); " ALS Resolution: %u-bit\n"
ESP_LOGCONFIG(TAG, " UV Resolution: %u-bit", RESOLUTION_BITS[this->res_uv_]); " UV Gain: X%.0f\n"
" UV Resolution: %u-bit",
GAINVALUES[this->gain_als_], RESOLUTION_BITS[this->res_als_], GAINVALUES[this->gain_uv_],
RESOLUTION_BITS[this->res_uv_]);
} }
void LTR390Component::update() { void LTR390Component::update() {

View File

@ -94,16 +94,21 @@ void LTRAlsPs501Component::dump_config() {
}; };
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
ESP_LOGCONFIG(TAG, " Device type: %s", get_device_type(this->ltr_type_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Automatic mode: %s", ONOFF(this->automatic_mode_enabled_)); " Device type: %s\n"
ESP_LOGCONFIG(TAG, " Gain: %.0fx", get_gain_coeff(this->gain_)); " Automatic mode: %s\n"
ESP_LOGCONFIG(TAG, " Integration time: %d ms", get_itime_ms(this->integration_time_)); " Gain: %.0fx\n"
ESP_LOGCONFIG(TAG, " Measurement repeat rate: %d ms", get_meas_time_ms(this->repeat_rate_)); " Integration time: %d ms\n"
ESP_LOGCONFIG(TAG, " Glass attenuation factor: %f", this->glass_attenuation_factor_); " Measurement repeat rate: %d ms\n"
ESP_LOGCONFIG(TAG, " Proximity gain: %.0fx", get_ps_gain_coeff(this->ps_gain_)); " Glass attenuation factor: %f\n"
ESP_LOGCONFIG(TAG, " Proximity cooldown time: %d s", this->ps_cooldown_time_s_); " Proximity gain: %.0fx\n"
ESP_LOGCONFIG(TAG, " Proximity high threshold: %d", this->ps_threshold_high_); " Proximity cooldown time: %d s\n"
ESP_LOGCONFIG(TAG, " Proximity low threshold: %d", this->ps_threshold_low_); " Proximity high threshold: %d\n"
" Proximity low threshold: %d",
get_device_type(this->ltr_type_), ONOFF(this->automatic_mode_enabled_), get_gain_coeff(this->gain_),
get_itime_ms(this->integration_time_), get_meas_time_ms(this->repeat_rate_),
this->glass_attenuation_factor_, get_ps_gain_coeff(this->ps_gain_), this->ps_cooldown_time_s_,
this->ps_threshold_high_, this->ps_threshold_low_);
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);

View File

@ -85,21 +85,28 @@ void LTRAlsPsComponent::dump_config() {
LOG_I2C_DEVICE(this); LOG_I2C_DEVICE(this);
ESP_LOGCONFIG(TAG, " Device type: %s", get_device_type(this->ltr_type_)); ESP_LOGCONFIG(TAG, " Device type: %s", get_device_type(this->ltr_type_));
if (this->is_als_()) { if (this->is_als_()) {
ESP_LOGCONFIG(TAG, " Automatic mode: %s", ONOFF(this->automatic_mode_enabled_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Gain: %.0fx", get_gain_coeff(this->gain_)); " Automatic mode: %s\n"
ESP_LOGCONFIG(TAG, " Integration time: %d ms", get_itime_ms(this->integration_time_)); " Gain: %.0fx\n"
ESP_LOGCONFIG(TAG, " Measurement repeat rate: %d ms", get_meas_time_ms(this->repeat_rate_)); " Integration time: %d ms\n"
ESP_LOGCONFIG(TAG, " Glass attenuation factor: %f", this->glass_attenuation_factor_); " Measurement repeat rate: %d ms\n"
" Glass attenuation factor: %f",
ONOFF(this->automatic_mode_enabled_), get_gain_coeff(this->gain_),
get_itime_ms(this->integration_time_), get_meas_time_ms(this->repeat_rate_),
this->glass_attenuation_factor_);
LOG_SENSOR(" ", "ALS calculated lux", this->ambient_light_sensor_); LOG_SENSOR(" ", "ALS calculated lux", this->ambient_light_sensor_);
LOG_SENSOR(" ", "CH1 Infrared counts", this->infrared_counts_sensor_); LOG_SENSOR(" ", "CH1 Infrared counts", this->infrared_counts_sensor_);
LOG_SENSOR(" ", "CH0 Visible+IR counts", this->full_spectrum_counts_sensor_); LOG_SENSOR(" ", "CH0 Visible+IR counts", this->full_spectrum_counts_sensor_);
LOG_SENSOR(" ", "Actual gain", this->actual_gain_sensor_); LOG_SENSOR(" ", "Actual gain", this->actual_gain_sensor_);
} }
if (this->is_ps_()) { if (this->is_ps_()) {
ESP_LOGCONFIG(TAG, " Proximity gain: %.0fx", get_ps_gain_coeff(this->ps_gain_)); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Proximity cooldown time: %d s", this->ps_cooldown_time_s_); " Proximity gain: %.0fx\n"
ESP_LOGCONFIG(TAG, " Proximity high threshold: %d", this->ps_threshold_high_); " Proximity cooldown time: %d s\n"
ESP_LOGCONFIG(TAG, " Proximity low threshold: %d", this->ps_threshold_low_); " Proximity high threshold: %d\n"
" Proximity low threshold: %d",
get_ps_gain_coeff(this->ps_gain_), this->ps_cooldown_time_s_, this->ps_threshold_high_,
this->ps_threshold_low_);
LOG_SENSOR(" ", "Proximity counts", this->proximity_counts_sensor_); LOG_SENSOR(" ", "Proximity counts", this->proximity_counts_sensor_);
} }
LOG_UPDATE_INTERVAL(this); LOG_UPDATE_INTERVAL(this);

View File

@ -85,11 +85,14 @@ static void rounder_cb(lv_disp_drv_t *disp_drv, lv_area_t *area) {
lv_event_code_t lv_api_event; // NOLINT lv_event_code_t lv_api_event; // NOLINT
lv_event_code_t lv_update_event; // NOLINT lv_event_code_t lv_update_event; // NOLINT
void LvglComponent::dump_config() { void LvglComponent::dump_config() {
ESP_LOGCONFIG(TAG, "LVGL:"); ESP_LOGCONFIG(TAG,
ESP_LOGCONFIG(TAG, " Display width/height: %d x %d", this->disp_drv_.hor_res, this->disp_drv_.ver_res); "LVGL:\n"
ESP_LOGCONFIG(TAG, " Buffer size: %zu%%", 100 / this->buffer_frac_); " Display width/height: %d x %d\n"
ESP_LOGCONFIG(TAG, " Rotation: %d", this->rotation); " Buffer size: %zu%%\n"
ESP_LOGCONFIG(TAG, " Draw rounding: %d", (int) this->draw_rounding); " Rotation: %d\n"
" Draw rounding: %d",
this->disp_drv_.hor_res, this->disp_drv_.ver_res, 100 / this->buffer_frac_, this->rotation,
(int) this->draw_rounding);
} }
void LvglComponent::set_paused(bool paused, bool show_snow) { void LvglComponent::set_paused(bool paused, bool show_snow) {
this->paused_ = paused; this->paused_ = paused;

View File

@ -97,8 +97,8 @@ void MatrixKeypad::loop() {
} }
void MatrixKeypad::dump_config() { void MatrixKeypad::dump_config() {
ESP_LOGCONFIG(TAG, "Matrix Keypad:"); ESP_LOGCONFIG(TAG, "Matrix Keypad:\n"
ESP_LOGCONFIG(TAG, " Rows:"); " Rows:");
for (auto &pin : this->rows_) { for (auto &pin : this->rows_) {
LOG_PIN(" Pin: ", pin); LOG_PIN(" Pin: ", pin);
} }

Some files were not shown because too many files have changed in this diff Show More