Merge pull request #13617 from pcdiem/pwmdimmer1

Add SO73 support to PWM Dimmer
This commit is contained in:
Theo Arends 2021-11-09 09:29:56 +01:00 committed by GitHub
commit 8a8aa8e5e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();