diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index c19314725..3f31dddc8 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -2567,14 +2567,20 @@ void CmndDnsTimeout(void) { } #ifdef USE_I2C -void CmndI2cScan(void) -{ - if ((1 == XdrvMailbox.index) && (TasmotaGlobal.i2c_enabled)) { - I2cScan(); +void CmndI2cScan(void) { + // I2CScan0 - Scan bus1 and bus2 + // I2CScan - Scan bus1 + // I2CScan2 - Scan bus2 + if (TasmotaGlobal.i2c_enabled) { + if ((0 == XdrvMailbox.index) || (1 == XdrvMailbox.index)) { + I2cScan(); + } } #ifdef ESP32 - if ((2 == XdrvMailbox.index) && (TasmotaGlobal.i2c_enabled_2)) { - I2cScan(1); + if (TasmotaGlobal.i2c_enabled_2) { + if ((0 == XdrvMailbox.index) || (2 == XdrvMailbox.index)) { + I2cScan(1); + } } #endif }