From 8f973e3b3a3e555da142ba2660e54687528793c3 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 20 Jul 2025 16:18:26 +0200 Subject: [PATCH] Fix iFan response to command Power0 (#23595) --- tasmota/tasmota_support/support_tasmota.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tasmota/tasmota_support/support_tasmota.ino b/tasmota/tasmota_support/support_tasmota.ino index bf3985329..db2ac55b9 100644 --- a/tasmota/tasmota_support/support_tasmota.ino +++ b/tasmota/tasmota_support/support_tasmota.ino @@ -389,6 +389,7 @@ void SetAllPower(uint32_t state, uint32_t source) { publish_power = false; } if (((state >= POWER_OFF) && (state <= POWER_TOGGLE)) || (POWER_OFF_FORCE == state)) { + power_t current_power = TasmotaGlobal.power; power_t all_on = POWER_MASK >> (POWER_SIZE - TasmotaGlobal.devices_present); switch (state) { case POWER_OFF: @@ -408,6 +409,11 @@ void SetAllPower(uint32_t state, uint32_t source) { TasmotaGlobal.power = 0; break; } +#ifdef USE_SONOFF_IFAN + // Do not touch Fan relays + TasmotaGlobal.power &= 0x0001; + TasmotaGlobal.power |= (current_power & 0xFFFE); +#endif // USE_SONOFF_IFAN SetDevicePower(TasmotaGlobal.power, source); } if (publish_power) {