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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,7 +37,7 @@ void UltrasonicSensorComponent::update() {
this->publish_state(NAN);
} else {
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);
}
}