mirror of
https://github.com/esphome/esphome.git
synced 2025-09-18 11:12:20 +01:00
Update esphome/components/mcp4461/mcp4461.cpp
Co-authored-by: Djordje Mandic <6750655+DjordjeMandic@users.noreply.github.com>
This commit is contained in:
@@ -128,13 +128,7 @@ uint16_t Mcp4461Component::get_wiper_level(uint8_t wiper) {
|
||||
}
|
||||
if (!this->read_byte_16(reg, &buf)) {
|
||||
this->status_set_warning();
|
||||
if (wiper > 3) {
|
||||
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);
|
||||
}
|
||||
ESP_LOGW(TAG, "Error fetching %swiper %" PRIu8 " value", (wiper > 3) ? "nonvolatile " : "", wiper);
|
||||
return 0;
|
||||
}
|
||||
return buf;
|
||||
|
Reference in New Issue
Block a user