From 477abc05ae65e80efc1923f66bce0e6a7e6dfea0 Mon Sep 17 00:00:00 2001 From: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com> Date: Tue, 15 Apr 2025 01:00:44 -0400 Subject: [PATCH] [am2315c] Use warning not fail during update (#8499) --- esphome/components/am2315c/am2315c.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/components/am2315c/am2315c.cpp b/esphome/components/am2315c/am2315c.cpp index 715251a9df..90565de740 100644 --- a/esphome/components/am2315c/am2315c.cpp +++ b/esphome/components/am2315c/am2315c.cpp @@ -128,7 +128,7 @@ void AM2315C::update() { data[2] = 0x00; if (this->write(data, 3) != i2c::ERROR_OK) { ESP_LOGE(TAG, "Write failed!"); - this->mark_failed(); + this->status_set_warning(); return; } @@ -138,12 +138,12 @@ void AM2315C::update() { uint8_t status = 0; if (this->read(&status, 1) != i2c::ERROR_OK) { ESP_LOGE(TAG, "Read failed!"); - this->mark_failed(); + this->status_set_warning(); return; } if ((status & 0x80) == 0x80) { ESP_LOGE(TAG, "HW still busy!"); - this->mark_failed(); + this->status_set_warning(); return; } @@ -151,7 +151,7 @@ void AM2315C::update() { uint8_t data[7]; if (this->read(data, 7) != i2c::ERROR_OK) { ESP_LOGE(TAG, "Read failed!"); - this->mark_failed(); + this->status_set_warning(); return; }