From d7a2816c58f46dd7b40cd18c535e6c0c5fd9d92c Mon Sep 17 00:00:00 2001 From: dmkif Date: Sun, 12 Jan 2020 16:38:40 +0100 Subject: [PATCH] Update hdc1080.cpp (#887) * Update hdc1080.cpp increase waittime, to fix reading errors * Fix: Update HDC1080.cpp i fixed the my change on write_bytes --- esphome/components/hdc1080/hdc1080.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome/components/hdc1080/hdc1080.cpp b/esphome/components/hdc1080/hdc1080.cpp index 4041c0c464..915c44b155 100644 --- a/esphome/components/hdc1080/hdc1080.cpp +++ b/esphome/components/hdc1080/hdc1080.cpp @@ -36,7 +36,7 @@ void HDC1080Component::dump_config() { } void HDC1080Component::update() { uint16_t raw_temp; - if (!this->read_byte_16(HDC1080_CMD_TEMPERATURE, &raw_temp, 9)) { + if (!this->read_byte_16(HDC1080_CMD_TEMPERATURE, &raw_temp, 20)) { this->status_set_warning(); return; } @@ -44,7 +44,7 @@ void HDC1080Component::update() { this->temperature_->publish_state(temp); uint16_t raw_humidity; - if (!this->read_byte_16(HDC1080_CMD_HUMIDITY, &raw_humidity, 9)) { + if (!this->read_byte_16(HDC1080_CMD_HUMIDITY, &raw_humidity, 20)) { this->status_set_warning(); return; }