Add SO73 support to PWM Dimmer

This commit is contained in:
Paul C Diem 2021-11-08 19:51:41 -06:00
parent 116f670631
commit 925321c4f7
2 changed files with 2 additions and 2 deletions

View File

@ -565,7 +565,7 @@ bool SendKey(uint32_t key, uint32_t device, uint32_t state)
result = XdrvRulesProcess(0);
}
#ifdef USE_PWM_DIMMER
if (PWM_DIMMER != TasmotaGlobal.module_type || !result) {
if (PWM_DIMMER != TasmotaGlobal.module_type || (!result && !Settings->flag3.mqtt_buttons)) {
#endif // USE_PWM_DIMMER
int32_t payload_save = XdrvMailbox.payload;
XdrvMailbox.payload = device_save << 24 | key << 16 | state << 8 | device;

View File

@ -758,7 +758,7 @@ bool Xdrv35(uint8_t function)
case FUNC_BUTTON_PRESSED:
// If the button is pressed or was just released, ...
if (!XdrvMailbox.payload || button_pressed[XdrvMailbox.index]) {
if (!Settings->flag3.mqtt_buttons && (!XdrvMailbox.payload || button_pressed[XdrvMailbox.index])) {
uint32_t button_index = XdrvMailbox.index;
uint32_t now = millis();