diff --git a/tasmota/tasmota_support/support_button _v3.ino b/tasmota/tasmota_support/support_button _v3.ino index a7d776261..617235e81 100644 --- a/tasmota/tasmota_support/support_button _v3.ino +++ b/tasmota/tasmota_support/support_button _v3.ino @@ -388,8 +388,8 @@ void ButtonHandler(void) { if (NOT_PRESSED == button) { Button.hold_timer[button_index] = 0; - if (Settings->flag3.mqtt_buttons && PRESSED == Button.last_state[button_index] && !Button.press_counter[button_index]) { // SetOption73 (0) - Decouple button from relay and send just mqtt topic - MqttButtonTopic(button_index + 1, 6, 0); + if (Settings->flag3.mqtt_buttons && (PRESSED == Button.last_state[button_index]) && !Button.press_counter[button_index]) { // SetOption73 (0) - Decouple button from relay and send just mqtt topic + MqttButtonTopic(button_index +1, 6, 0); } } else { Button.hold_timer[button_index]++; diff --git a/tasmota/tasmota_support/support_button_v2.ino b/tasmota/tasmota_support/support_button_v2.ino index 19538b0ed..7dca673ed 100644 --- a/tasmota/tasmota_support/support_button_v2.ino +++ b/tasmota/tasmota_support/support_button_v2.ino @@ -29,7 +29,7 @@ #define TOUCH_HIT_THRESHOLD 3 // successful hits to filter out noise const char kMultiPress[] PROGMEM = - "|SINGLE|DOUBLE|TRIPLE|QUAD|PENTA|"; + "|SINGLE|DOUBLE|TRIPLE|QUAD|PENTA|CLEAR|"; struct BUTTON { uint32_t debounce = 0; // Button debounce timer @@ -256,6 +256,9 @@ void ButtonHandler(void) { if (NOT_PRESSED == button) { Button.hold_timer[button_index] = 0; + if (Settings->flag3.mqtt_buttons && (PRESSED == Button.last_state[button_index]) && !Button.press_counter[button_index]) { // SetOption73 (0) - Decouple button from relay and send just mqtt topic + MqttButtonTopic(button_index +1, 6, 0); + } } else { Button.hold_timer[button_index]++; if (Settings->flag.button_single) { // SetOption13 (0) - Allow only single button press for immediate action