Publish NAN when dallas conversion failed (#3227)

This commit is contained in:
Otto Winter 2022-02-19 14:11:01 +01:00 committed by GitHub
parent 125c693e3f
commit d594f43ebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,6 +111,9 @@ void DallasComponent::update() {
if (!result) { if (!result) {
ESP_LOGE(TAG, "Requesting conversion failed"); ESP_LOGE(TAG, "Requesting conversion failed");
this->status_set_warning(); this->status_set_warning();
for (auto *sensor : this->sensors_) {
sensor->publish_state(NAN);
}
return; return;
} }