Publish NAN when dallas conversion failed (#3227)

This commit is contained in:
Otto Winter 2022-02-19 14:11:01 +01:00 committed by Jesse Hills
parent c2f5ac9eba
commit 0c4de2bc97
No known key found for this signature in database
GPG key ID: BEAAE804EFD8E83A

View file

@ -110,6 +110,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;
} }