mirror of https://github.com/arendst/Tasmota.git
Fix switchmode 15 publish old switch state
The forced MqttPublishSensor() was send an immediate SENSOR message with the switch's last_state. So the last_state must be updated before the SENSOR message is sent.
This commit is contained in:
parent
5e044dbcc6
commit
e6acebf638
|
@ -404,6 +404,7 @@ void SwitchHandler(uint32_t mode) {
|
|||
}
|
||||
break;
|
||||
case PUSH_IGNORE:
|
||||
Switch.last_state[i] = button; // Update switch state before publishing
|
||||
MqttPublishSensor();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue