mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-13 08:56:38 +02:00
Pacth from homeautomation22
This commit is contained in:
parent
2df3c26657
commit
000ed8ac53
12 changed files with 191 additions and 38 deletions
|
@ -283,6 +283,18 @@ void web::showSave(AsyncWebServerRequest *request) {
|
|||
mConfig->ntpPort = request->arg("ntpPort").toInt() & 0xffff;
|
||||
}
|
||||
|
||||
// sun
|
||||
if(request->arg("sunLat") == "" || (request->arg("sunLon") == "")) {
|
||||
mConfig->sunLat = 0.0;
|
||||
mConfig->sunLon = 0.0;
|
||||
mConfig->sunDisNightCom = false;
|
||||
} else {
|
||||
mConfig->sunLat = request->arg("sunLat").toFloat();
|
||||
mConfig->sunLon = request->arg("sunLon").toFloat();
|
||||
mConfig->sunDisNightCom = (request->arg("sunDisNightCom") == "on");
|
||||
}
|
||||
|
||||
|
||||
// mqtt
|
||||
if(request->arg("mqttAddr") != "") {
|
||||
String addr = request->arg("mqttAddr");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue