Remove double publish_state in ultrasonic sensor (#696)

Fixes https://github.com/esphome/issues/issues/589
This commit is contained in:
Brandon Davidson 2019-08-19 12:13:48 -07:00 committed by GitHub
parent 718c494013
commit a0b3d861fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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