mirror of
https://github.com/esphome/esphome.git
synced 2025-01-19 12:24:05 +00:00
DHT publish NAN on invalid reading
Fixes https://github.com/esphome/issues/issues/590
This commit is contained in:
parent
4b0f203049
commit
c2028f7378
@ -56,6 +56,8 @@ void DHT::update() {
|
|||||||
str = " and consider manually specifying the DHT model using the model option";
|
str = " and consider manually specifying the DHT model using the model option";
|
||||||
}
|
}
|
||||||
ESP_LOGW(TAG, "Invalid readings! Please check your wiring (pull-up resistor, pin number)%s.", str);
|
ESP_LOGW(TAG, "Invalid readings! Please check your wiring (pull-up resistor, pin number)%s.", str);
|
||||||
|
this->temperature_sensor_->publish_state(NAN);
|
||||||
|
this->humidity_sensor_->publish_state(NAN);
|
||||||
this->status_set_warning();
|
this->status_set_warning();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user