diff --git a/sonoff/support_command.ino b/sonoff/support_command.ino index 29543cd4d..9853ac974 100644 --- a/sonoff/support_command.ino +++ b/sonoff/support_command.ino @@ -621,6 +621,9 @@ void CmndSetoption(void) if (18 == pindex) { // SetOption68 for multi-channel PWM, requires a reboot restart_flag = 2; } + if (15 == pindex) { // SetOption65 for tuya_disable_dimmer requires a reboot + restart_flag = 2; + } } } else { // SetOption32 .. 49 diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 695043b15..b7541910e 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -942,9 +942,7 @@ void HandleRoot(void) if ((LST_COLDWARM == (light_type &7)) || (LST_RGBWC == (light_type &7))) { WSContentSend_P(HTTP_MSG_SLIDER1, LightGetColorTemp()); } - if (!Settings.flag3.tuya_disable_dimmer) { - WSContentSend_P(HTTP_MSG_SLIDER2, Settings.light_dimmer); - } + WSContentSend_P(HTTP_MSG_SLIDER2, Settings.light_dimmer); } #endif WSContentSend_P(HTTP_TABLE100); diff --git a/sonoff/xdrv_16_tuyadimmer.ino b/sonoff/xdrv_16_tuyadimmer.ino index 4abdcdeac..6a916bd0f 100644 --- a/sonoff/xdrv_16_tuyadimmer.ino +++ b/sonoff/xdrv_16_tuyadimmer.ino @@ -291,7 +291,12 @@ bool TuyaModuleSelected(void) Settings.my_gp.io[3] = GPIO_TUYA_RX; restart_flag = 2; } - light_type = LT_SERIAL1; + if (Settings.flag3.tuya_disable_dimmer == 0) { + light_type = LT_SERIAL1; + } else { + light_type = LT_BASIC; + } + return true; }