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
This commit is contained in:
dmkif 2020-01-12 16:38:40 +01:00 committed by Otto Winter
parent a30d2f291c
commit d7a2816c58

View File

@ -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;
}