1
0
mirror of https://github.com/esphome/esphome.git synced 2025-04-08 20:00:27 +01:00

Update esphome/components/mcp4461/mcp4461.cpp

Co-authored-by: Djordje Mandic <6750655+DjordjeMandic@users.noreply.github.com>
This commit is contained in:
Oliver Kleinecke 2025-02-03 12:26:25 +01:00 committed by GitHub
parent e1f132681c
commit 8b42738618
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,13 +128,7 @@ uint16_t Mcp4461Component::get_wiper_level(uint8_t wiper) {
} }
if (!this->read_byte_16(reg, &buf)) { if (!this->read_byte_16(reg, &buf)) {
this->status_set_warning(); this->status_set_warning();
if (wiper > 3) { ESP_LOGW(TAG, "Error fetching %swiper %" PRIu8 " value", (wiper > 3) ? "nonvolatile " : "", wiper);
this->status_set_warning();
ESP_LOGW(TAG, "Error fetching nonvolatile wiper %d value", wiper);
} else {
this->status_set_warning();
ESP_LOGW(TAG, "Error fetching wiper %d value", wiper);
}
return 0; return 0;
} }
return buf; return buf;