1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-11 14:23:47 +01:00

Introduce "communication failed" log macro (#8939)

This commit is contained in:
Keith Burzinski
2025-05-29 01:59:38 -05:00
committed by GitHub
parent 64e4589f4e
commit 44f1ff10e6
109 changed files with 162 additions and 152 deletions

View File

@@ -275,17 +275,17 @@ void SGP4xComponent::dump_config() {
if (this->is_failed()) {
switch (this->error_code_) {
case COMMUNICATION_FAILED:
ESP_LOGW(TAG, "Communication failed! Is the sensor connected?");
ESP_LOGW(TAG, ESP_LOG_MSG_COMM_FAIL);
break;
case SERIAL_NUMBER_IDENTIFICATION_FAILED:
ESP_LOGW(TAG, "Get Serial number failed.");
ESP_LOGW(TAG, "Get Serial number failed");
break;
case SELF_TEST_FAILED:
ESP_LOGW(TAG, "Self test failed.");
ESP_LOGW(TAG, "Self test failed");
break;
default:
ESP_LOGW(TAG, "Unknown setup error!");
ESP_LOGW(TAG, "Unknown setup error");
break;
}
} else {