diff --git a/code/espurna/terminal.ino b/code/espurna/terminal.ino index d46409c9..d57818ab 100644 --- a/code/espurna/terminal.ino +++ b/code/espurna/terminal.ino @@ -408,6 +408,11 @@ void terminalSetup() { #endif }); + #if WEB_SUPPORT + wsRegister() + .onVisible([](JsonObject& root) { root["cmdVisible"] = 1; }); + #endif + _terminalInitCommand(); #if SERIAL_RX_ENABLED diff --git a/code/espurna/ws.ino b/code/espurna/ws.ino index b9780c80..933f718f 100644 --- a/code/espurna/ws.ino +++ b/code/espurna/ws.ino @@ -540,9 +540,6 @@ void _wsOnConnected(JsonObject& root) { root["btnDelay"] = getSetting("btnDelay", BUTTON_DBLCLICK_DELAY).toInt(); root["webPort"] = getSetting("webPort", WEB_PORT).toInt(); root["wsAuth"] = getSetting("wsAuth", WS_AUTHENTICATION).toInt() == 1; - #if TERMINAL_SUPPORT - root["cmdVisible"] = 1; - #endif root["hbMode"] = getSetting("hbMode", HEARTBEAT_MODE).toInt(); root["hbInterval"] = getSetting("hbInterval", HEARTBEAT_INTERVAL).toInt(); }