From 17dd1c3902f7fc44d3a1f0f8b40587bef61a53c1 Mon Sep 17 00:00:00 2001 From: erikveg Date: Thu, 2 May 2024 08:29:05 +0000 Subject: [PATCH] bugfix --- esphome/components/ain4_20ma/ain4_20ma.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/ain4_20ma/ain4_20ma.cpp b/esphome/components/ain4_20ma/ain4_20ma.cpp index 6835eed80..52518b2a4 100644 --- a/esphome/components/ain4_20ma/ain4_20ma.cpp +++ b/esphome/components/ain4_20ma/ain4_20ma.cpp @@ -16,7 +16,7 @@ void Ain4_20maComponent::dump_config() { void Ain4_20maComponent::update() { uint8_t data[2]; - i2c::ErrorCode err = this->read_register(0x20, &data, 2, true); + i2c::ErrorCode err = this->read_register(0x20, data, 2); if (err != i2c::ERROR_OK) { ESP_LOGE(TAG, "Error reading data from AIN4-20mA"); this->publish_state(NAN);