From d8ea10877e783ef34eb95d169369c50739af4490 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 2 Feb 2021 15:48:29 +0100 Subject: [PATCH] Cleanup webserver --- tasmota/xdrv_01_webserver.ino | 13 +------------ tasmota/xdrv_16_tuyamcu.ino | 4 ++++ 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/tasmota/xdrv_01_webserver.ino b/tasmota/xdrv_01_webserver.ino index 98357fe52..e2a50a409 100644 --- a/tasmota/xdrv_01_webserver.ino +++ b/tasmota/xdrv_01_webserver.ino @@ -1261,18 +1261,7 @@ bool HandleRootStatusRefresh(void) WSContentSend_P(PSTR("")); } -#ifdef USE_TUYA_MCU - if (IsModuleTuya()) { - uint32_t modeset = TuyaModeSet(); - if (AsModuleTuyaMS()) { - WSContentSend_P(PSTR("
" D_JSON_IRHVAC_MODE ": %d
"), modeset); - } - } -#endif // USE_TUYA_MCU - -#ifdef USE_WEB_SSE - WSContentSend_P(PSTR("\n\n")); -#endif // USE_WEB_SSE + WSContentSend_P(PSTR("\n\n")); // Prep for SSE WSContentEnd(); return true; diff --git a/tasmota/xdrv_16_tuyamcu.ino b/tasmota/xdrv_16_tuyamcu.ino index 1f8da77e1..98e3370e8 100644 --- a/tasmota/xdrv_16_tuyamcu.ino +++ b/tasmota/xdrv_16_tuyamcu.ino @@ -1336,6 +1336,10 @@ void TuyaSensorsShow(bool json) break; } } + if (AsModuleTuyaMS()) { + WSContentSend_P(PSTR("{s}" D_JSON_IRHVAC_MODE "{m}%d{e}"), Tuya.ModeSet); + } + #endif // USE_WEBSERVER } }