diff --git a/RELEASENOTES.md b/RELEASENOTES.md index e474c75ec..56c3a65b1 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -62,7 +62,6 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Change Zigbee command prefix from ``Zigbee*`` to ``Zb*`` - Change MQTT message size with additional 200 characters - Change display of some date and time messages from "Wed Feb 19 10:45:12 2020" to "2020-02-19T10:45:12" -- Change switchmode 6 according to issue 7778 (#7831) - Fix Sonoff Bridge, Sc, L1, iFan03 and CSE7766 serial interface to forced speed, config and disable logging - Fix commands ``Display`` and ``Counter`` from overruling command processing (#7322) - Fix ``White`` added to light status (#7142) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 90f2a711a..cba4ec13b 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -4,7 +4,7 @@ - Change default my_user_config.h driver and sensor support removing most sensors and adding most drivers - Change IRremoteESP8266 library updated to v2.7.4 -- Change switchmode 6 according to issue 7778 (#7831) +- Revert switchmode 6 according to issue 7778 (#7831) - Add support for Jarolift rollers by Keeloq algorithm - Add Zigbee features and improvements and remove support for Zigbee commands starting with ``Zigbee...`` - Add support for MaxBotix HRXL-MaxSonar ultrasonic range finders by Jon Little (#7814) diff --git a/tasmota/support_switch.ino b/tasmota/support_switch.ino index 49b9428b0..e873ea200 100644 --- a/tasmota/support_switch.ino +++ b/tasmota/support_switch.ino @@ -218,9 +218,20 @@ void SwitchHandler(uint8_t mode) } if ((NOT_PRESSED == button) && (PRESSED == Switch.last_state[i]) && (Switch.hold_timer[i])) { Switch.hold_timer[i] = 0; // Button released and hold timer not expired : stop timer... - switchflag = POWER_TOGGLE; // ...and Toggle + switchflag = POWER_TOGGLE; // ...and Toggle } break; + case PUSHBUTTONHOLD_INV: + if ((NOT_PRESSED == button) && (PRESSED == Switch.last_state[i])) { + Switch.hold_timer[i] = loops_per_second * Settings.param[P_HOLD_TIME] / 10; // Start timer on button press... + } + if ((PRESSED == button) && (NOT_PRESSED == Switch.last_state[i]) && (Switch.hold_timer[i])) { + Switch.hold_timer[i] = 0; // Button released and hold timer not expired : stop timer. + switchflag = POWER_TOGGLE; // ...and Toggle + } + break; +/* + // Reverted Fix switchmode 6 according to issue 7778 (#7831) case PUSHBUTTONHOLD_INV: if ((PRESSED == button) && (NOT_PRESSED == Switch.last_state[i])) { Switch.hold_timer[i] = loops_per_second * Settings.param[P_HOLD_TIME] / 10; // Start timer on button press... @@ -230,6 +241,7 @@ void SwitchHandler(uint8_t mode) Switch.hold_timer[i] = 0; // Button released : stop timer. } break; +*/ case TOGGLEMULTI: case FOLLOWMULTI: case FOLLOWMULTI_INV: