Ability to clear fixed price

This commit is contained in:
Gunnar Skjold
2023-10-15 15:47:31 +02:00
parent 60fff4533a
commit 4634050700

View File

@@ -1450,7 +1450,7 @@ void AmsWebServer::handleSave() {
strcpy(entsoe.area, priceRegion.c_str());
strcpy(entsoe.currency, server.arg(F("pc")).c_str());
entsoe.multiplier = server.arg(F("pm")).toFloat() * 1000;
entsoe.fixedPrice = server.arg(F("pf")).toFloat() * 1000;
entsoe.fixedPrice = server.hasArg(F("pf")) ? server.arg(F("pf")).toFloat() * 1000 : 0;
config->setEntsoeConfig(entsoe);
}