From d882a631fae88a3c8fe1ec0fb07022eb751fe2be Mon Sep 17 00:00:00 2001 From: Teemu Mikkonen Date: Fri, 24 May 2019 20:19:39 +0300 Subject: [PATCH] Temp&humidity have accuracy of 1 decimal places Co-Authored-By: Otto Winter --- esphome/components/am2320/am2320.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/am2320/am2320.cpp b/esphome/components/am2320/am2320.cpp index 462e736981..59cb977fe8 100644 --- a/esphome/components/am2320/am2320.cpp +++ b/esphome/components/am2320/am2320.cpp @@ -41,7 +41,7 @@ void AM2320Component::update() { temperature = (data[4] & 0x80) ? -temperature : temperature; float humidity = ((data[2] << 8) + data[3]) / 10.0; - ESP_LOGD(TAG, "Got temperature=%.2f°C humidity=%.2f%%", temperature, humidity); + ESP_LOGD(TAG, "Got temperature=%.1f°C humidity=%.1f%%", temperature, humidity); if (this->temperature_sensor_ != nullptr) this->temperature_sensor_->publish_state(temperature); if (this->humidity_sensor_ != nullptr)