From 729dc29807f0ca9b1c32c490b095ed6555e02965 Mon Sep 17 00:00:00 2001 From: Paul C Diem Date: Wed, 10 Aug 2022 12:14:58 -0500 Subject: [PATCH 1/2] Set LED state on SO87 change --- tasmota/tasmota_support/support_command.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index ac5c11f00..e8a406163 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1386,6 +1386,9 @@ void CmndSetoptionBase(bool indexed) { case 25: // SetOption107 - Virtual CT Channel - signals whether the hardware white is cold CW (true) or warm WW (false) TasmotaGlobal.restart_flag = 2; break; + case 5: // SetOption87 - (PWM Dimmer) Turn red LED on (1) when powered off + TasmotaGlobal.restore_powered_off_led_counter = 1; + break; } } else if (5 == ptype) { // SetOption114 .. 145 From 20da738788abdd9c123f5b7e944442bedd4d67b6 Mon Sep 17 00:00:00 2001 From: Paul C Diem Date: Wed, 10 Aug 2022 14:56:30 -0500 Subject: [PATCH 2/2] Wrap restore_powered_off_led_counter in #ifdef --- tasmota/tasmota_support/support_command.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasmota/tasmota_support/support_command.ino b/tasmota/tasmota_support/support_command.ino index e8a406163..2fa54a43f 100644 --- a/tasmota/tasmota_support/support_command.ino +++ b/tasmota/tasmota_support/support_command.ino @@ -1386,9 +1386,11 @@ void CmndSetoptionBase(bool indexed) { case 25: // SetOption107 - Virtual CT Channel - signals whether the hardware white is cold CW (true) or warm WW (false) TasmotaGlobal.restart_flag = 2; break; +#ifdef USE_PWM_DIMMER case 5: // SetOption87 - (PWM Dimmer) Turn red LED on (1) when powered off TasmotaGlobal.restore_powered_off_led_counter = 1; break; +#endif // USE_PWM_DIMMER } } else if (5 == ptype) { // SetOption114 .. 145