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

Increased debug message precision (#5496)

This commit is contained in:
Luke Ansell
2023-10-08 22:20:43 +02:00
committed by GitHub
parent fa0dcac2c7
commit ee4ccf2762

View File

@@ -37,7 +37,7 @@ void UltrasonicSensorComponent::update() {
this->publish_state(NAN); this->publish_state(NAN);
} else { } else {
float result = UltrasonicSensorComponent::us_to_m(pulse_end - pulse_start); float result = UltrasonicSensorComponent::us_to_m(pulse_end - pulse_start);
ESP_LOGD(TAG, "'%s' - Got distance: %.2f m", this->name_.c_str(), result); ESP_LOGD(TAG, "'%s' - Got distance: %.3f m", this->name_.c_str(), result);
this->publish_state(result); this->publish_state(result);
} }
} }