mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 03:42:20 +01:00
DHT publish NAN on invalid reading
Fixes https://github.com/esphome/issues/issues/590
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user