From 925321c4f72557574d8f32b0d14df7e867ec6cc0 Mon Sep 17 00:00:00 2001 From: Paul C Diem Date: Mon, 8 Nov 2021 19:51:41 -0600 Subject: [PATCH] Add SO73 support to PWM Dimmer --- tasmota/support_tasmota.ino | 2 +- tasmota/xdrv_35_pwm_dimmer.ino | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 97fba4b6c..10bbcc495 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -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; diff --git a/tasmota/xdrv_35_pwm_dimmer.ino b/tasmota/xdrv_35_pwm_dimmer.ino index 261caa0c7..4b5101818 100644 --- a/tasmota/xdrv_35_pwm_dimmer.ino +++ b/tasmota/xdrv_35_pwm_dimmer.ino @@ -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();