Use default nightLightDelay if ND present.
This commit is contained in:
Blaž Kristan 2022-11-04 08:33:55 +01:00
parent 0cfda55b3a
commit 71d84fecba

View File

@ -947,11 +947,13 @@ bool handleSet(AsyncWebServerRequest *request, const String& req, bool apply)
} else {
nightlightActive = true;
if (!aNlDef) nightlightDelayMins = getNumVal(&req, pos);
else nightlightDelayMins = nightlightDelayMinsDefault;
nightlightStartTime = millis();
}
} else if (aNlDef)
{
nightlightActive = true;
nightlightDelayMins = nightlightDelayMinsDefault;
nightlightStartTime = millis();
}