mirror of
https://github.com/esphome/esphome.git
synced 2024-11-26 08:55:22 +01:00
DHT publish NAN on invalid reading
Fixes https://github.com/esphome/issues/issues/590
This commit is contained in:
parent
4b0f203049
commit
c2028f7378
1 changed files with 2 additions and 0 deletions
|
@ -56,6 +56,8 @@ void DHT::update() {
|
|||
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);
|
||||
this->temperature_sensor_->publish_state(NAN);
|
||||
this->humidity_sensor_->publish_state(NAN);
|
||||
this->status_set_warning();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue