mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
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:
parent
a30d2f291c
commit
d7a2816c58
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue