This commit is contained in:
Erik 2024-05-02 09:44:04 +02:00
parent e1d576afec
commit b78178af2b
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, &current, 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);