diff --git a/esphome/components/mcp3428/mcp3428.cpp b/esphome/components/mcp3428/mcp3428.cpp index b202c01d46..75b4f4e71f 100644 --- a/esphome/components/mcp3428/mcp3428.cpp +++ b/esphome/components/mcp3428/mcp3428.cpp @@ -12,6 +12,7 @@ void MCP3428Component::setup() { uint8_t anwser[3]; if (this->read(anwser, 3) != i2c::ErrorCode::NO_ERROR) { this->mark_failed(); + ESP_LOGE(TAG, "Communication with MCP3426/7/8 failed while reading device register!"); return; } @@ -41,6 +42,7 @@ void MCP3428Component::setup() { if (this->write(&config, 1) != i2c::ErrorCode::NO_ERROR) { this->mark_failed(); + ESP_LOGE(TAG, "Communication with MCP3426/7/8 failed while writing config!"); return; } this->prev_config_ = config; diff --git a/esphome/components/mcp3428/sensor/mcp3428_sensor.cpp b/esphome/components/mcp3428/sensor/mcp3428_sensor.cpp index 36095c83a0..2c83a3e1fc 100644 --- a/esphome/components/mcp3428/sensor/mcp3428_sensor.cpp +++ b/esphome/components/mcp3428/sensor/mcp3428_sensor.cpp @@ -55,9 +55,9 @@ void MCP3428Sensor::update() { void MCP3428Sensor::dump_config() { LOG_SENSOR(" ", "MCP3426/7/8 Sensor", this); - ESP_LOGCONFIG(TAG, " Multiplexer: %u", this->multiplexer_); - ESP_LOGCONFIG(TAG, " Gain: %u", this->gain_); - ESP_LOGCONFIG(TAG, " Resolution: %u", this->resolution_); + ESP_LOGCONFIG(TAG, " Multiplexer: Channel %u", this->multiplexer_ + 1); + ESP_LOGCONFIG(TAG, " Gain: %u", 0b0001 << this->gain_); + ESP_LOGCONFIG(TAG, " Resolution: %u", 12 + 2 * this->resolution_); } } // namespace mcp3428