diff --git a/code/espurna/homeassistant.ino b/code/espurna/homeassistant.ino index 070fc1ea..5d3b59e0 100644 --- a/code/espurna/homeassistant.ino +++ b/code/espurna/homeassistant.ino @@ -255,13 +255,17 @@ void _haInitCommands() { settingsRegisterCommand(F("HA.SEND"), [](Embedis* e) { setSetting("haEnabled", "1"); _haConfigure(); - wsSend(_haWebSocketOnSend); + #if WEB_SUPPORT + wsSend(_haWebSocketOnSend); + #endif DEBUG_MSG_P(PSTR("+OK\n")); }); settingsRegisterCommand(F("HA.CLEAR"), [](Embedis* e) { setSetting("haEnabled", "0"); _haConfigure(); - wsSend(_haWebSocketOnSend); + #if WEB_SUPPORT + wsSend(_haWebSocketOnSend); + #endif DEBUG_MSG_P(PSTR("+OK\n")); }); } diff --git a/code/espurna/settings.ino b/code/espurna/settings.ino index 9d5767b3..64886b30 100644 --- a/code/espurna/settings.ino +++ b/code/espurna/settings.ino @@ -269,11 +269,13 @@ void _settingsInitCommands() { DEBUG_MSG_P(PSTR("+OK\n")); }); - settingsRegisterCommand(F("RELOAD"), [](Embedis* e) { - wsReload(); - DEBUG_MSG_P(PSTR("+OK\n")); - }); - + #if WEB_SUPPORT + settingsRegisterCommand(F("RELOAD"), [](Embedis* e) { + wsReload(); + DEBUG_MSG_P(PSTR("+OK\n")); + }); + #endif + settingsRegisterCommand(F("RESET"), [](Embedis* e) { DEBUG_MSG_P(PSTR("+OK\n")); deferredReset(100, CUSTOM_RESET_TERMINAL);