mirror of https://github.com/esphome/esphome.git
bugfix
This commit is contained in:
parent
b17f3a75b3
commit
17dd1c3902
|
@ -16,7 +16,7 @@ void Ain4_20maComponent::dump_config() {
|
||||||
void Ain4_20maComponent::update() {
|
void Ain4_20maComponent::update() {
|
||||||
uint8_t data[2];
|
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) {
|
if (err != i2c::ERROR_OK) {
|
||||||
ESP_LOGE(TAG, "Error reading data from AIN4-20mA");
|
ESP_LOGE(TAG, "Error reading data from AIN4-20mA");
|
||||||
this->publish_state(NAN);
|
this->publish_state(NAN);
|
||||||
|
|
Loading…
Reference in New Issue