diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index 42b4e1733..a601168a8 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -318,8 +318,8 @@ void SetDevicePower(power_t rpower, uint32_t source) { // Reset bistable relay here to fix non-interlock situations due to fast switching if (TasmotaGlobal.rel_bistable) { // If bistable relays in the mix reset them after 40ms - delay(40); // About 5 x operation time - for (uint32_t i = 0; i < MAX_RELAYS; i++) { + delay(40); // Keep energized for about 5 x operation time + for (uint32_t i = 0; i < port; i++) { // Reset up to detected amount of ports if (bitRead(TasmotaGlobal.rel_bistable, i)) { DigitalWrite(GPIO_REL1, i, bitRead(TasmotaGlobal.rel_inverted, i) ? 1 : 0); }