diff --git a/tasmota/xsns_55_hih_series.ino b/tasmota/xsns_55_hih_series.ino index 39990c259..298bb54d2 100644 --- a/tasmota/xsns_55_hih_series.ino +++ b/tasmota/xsns_55_hih_series.ino @@ -46,10 +46,9 @@ struct HIH6 { bool Hih6Read(void) { Wire.beginTransmission(HIH6_ADDR); -// Wire.write(0x00); // Select data register if (Wire.endTransmission() != 0) { return false; } // In case of error -// delay(40); // Wait for Valid data or use Stale data + delay(40); // Wait for Valid data (Stale data doesn't work. See #6808) uint8_t data[4]; Wire.requestFrom(HIH6_ADDR, 4); @@ -76,10 +75,12 @@ bool Hih6Read(void) void Hih6Detect(void) { if (Hih6.type) { return; } + if (I2cActive(HIH6_ADDR)) { return; } if (uptime < 2) { delay(20); } // Skip entering power on comand mode Hih6.type = Hih6Read(); if (Hih6.type) { + I2cSetActive(HIH6_ADDR); AddLog_P2(LOG_LEVEL_DEBUG, S_LOG_I2C_FOUND_AT, Hih6.types, HIH6_ADDR); } }