1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-13 00:32:20 +01:00

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
218 changed files with 1569 additions and 931 deletions

View File

@@ -171,9 +171,12 @@ void PulseCounterSensor::set_total_pulses(uint32_t pulses) {
void PulseCounterSensor::dump_config() {
LOG_SENSOR("", "Pulse Counter", this);
LOG_PIN(" Pin: ", this->pin_);
ESP_LOGCONFIG(TAG, " Rising Edge: %s", EDGE_MODE_TO_STRING[this->storage_.rising_edge_mode]);
ESP_LOGCONFIG(TAG, " Falling Edge: %s", EDGE_MODE_TO_STRING[this->storage_.falling_edge_mode]);
ESP_LOGCONFIG(TAG, " Filtering pulses shorter than %" PRIu32 " µs", this->storage_.filter_us);
ESP_LOGCONFIG(TAG,
" Rising Edge: %s\n"
" Falling Edge: %s\n"
" Filtering pulses shorter than %" PRIu32 " µs",
EDGE_MODE_TO_STRING[this->storage_.rising_edge_mode],
EDGE_MODE_TO_STRING[this->storage_.falling_edge_mode], this->storage_.filter_us);
LOG_UPDATE_INTERVAL(this);
}