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:
@@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user