mirror of
https://github.com/esphome/esphome.git
synced 2024-11-07 09:31:10 +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
@ -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 New Issue
Block a user