mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 10:46:31 +00:00
Fix iFan response to command Power0 (#23595)
This commit is contained in:
parent
37af8be39d
commit
8f973e3b3a
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user