mirror of https://github.com/esphome/esphome.git
bugfixes
This commit is contained in:
parent
e1d576afec
commit
b78178af2b
|
@ -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, ¤t, 2, true);
|
i2c::ErrorCode err = this->read_register(0x20, &data, 2, true);
|
||||||
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