1
0
mirror of https://github.com/esphome/esphome.git synced 2025-03-14 14:48:18 +00:00

Merge branch 'am2320-component' of https://github.com/T3m3z/esphome into am2320-component

This commit is contained in:
Mikkonen Teemu 2019-05-24 21:14:11 +03:00
commit 4ca84ae85a

View File

@ -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)