This commit is contained in:
erikveg 2024-05-02 08:29:05 +00:00
parent b17f3a75b3
commit 17dd1c3902
1 changed files with 1 additions and 1 deletions

View File

@ -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);