mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Introduce "communication failed" log macro (#8939)
This commit is contained in:
@@ -26,7 +26,7 @@ struct SensorData {
|
||||
|
||||
void IAQCore::setup() {
|
||||
if (this->write(nullptr, 0) != i2c::ERROR_OK) {
|
||||
ESP_LOGD(TAG, "Communication failed!");
|
||||
ESP_LOGD(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||
this->mark_failed();
|
||||
return;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ void IAQCore::dump_config() {
|
||||
LOG_I2C_DEVICE(this);
|
||||
LOG_UPDATE_INTERVAL(this);
|
||||
if (this->is_failed()) {
|
||||
ESP_LOGE(TAG, "Communication with AMS iAQ Core failed!");
|
||||
ESP_LOGE(TAG, ESP_LOG_MSG_COMM_FAIL);
|
||||
}
|
||||
LOG_SENSOR(" ", "CO2", this->co2_);
|
||||
LOG_SENSOR(" ", "TVOC", this->tvoc_);
|
||||
|
||||
Reference in New Issue
Block a user