From b78178af2badb2c24588d7048bf4cd30aa2a1a10 Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 2 May 2024 09:44:04 +0200 Subject: [PATCH] bugfixes --- 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 106001adf4..6835eed808 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, ¤t, 2, true); + i2c::ErrorCode err = this->read_register(0x20, &data, 2, true); if (err != i2c::ERROR_OK) { ESP_LOGE(TAG, "Error reading data from AIN4-20mA"); this->publish_state(NAN);