diff --git a/src/web/RestApi.h b/src/web/RestApi.h index cea845a2..de4fe8e3 100644 --- a/src/web/RestApi.h +++ b/src/web/RestApi.h @@ -838,13 +838,16 @@ class RestApi { mTimezoneOffset = jsonIn[F("val")]; else if(F("discovery_cfg") == jsonIn[F("cmd")]) mApp->setMqttDiscoveryFlag(); // for homeassistant + #if !defined(ETHERNET) else if(F("save_wifi") == jsonIn[F("cmd")]) { snprintf(mConfig->sys.stationSsid, SSID_LEN, "%s", jsonIn[F("ssid")].as()); snprintf(mConfig->sys.stationPwd, PWD_LEN, "%s", jsonIn[F("pwd")].as()); mApp->saveSettings(false); // without reboot mApp->setStopApAllowedMode(false); mApp->setupStation(); - } else if(F("save_iv") == jsonIn[F("cmd")]) { + } + #endif /* !defined(ETHERNET */ + else if(F("save_iv") == jsonIn[F("cmd")]) { Inverter<> *iv = mSys->getInverterByPos(jsonIn[F("id")], false); iv->config->enabled = jsonIn[F("en")]; iv->config->serial.u64 = jsonIn[F("ser")];