diff --git a/lib/AmsConfiguration/src/AmsConfiguration.cpp b/lib/AmsConfiguration/src/AmsConfiguration.cpp index 546c2419..b07347a5 100644 --- a/lib/AmsConfiguration/src/AmsConfiguration.cpp +++ b/lib/AmsConfiguration/src/AmsConfiguration.cpp @@ -580,6 +580,7 @@ void AmsConfiguration::clearEntsoe(EntsoeConfig& config) { strcpy(config.currency, ""); config.multiplier = 1000; config.enabled = false; + config.fixedPrice = 0; } bool AmsConfiguration::isEntsoeChanged() { diff --git a/lib/SvelteUi/src/AmsWebServer.cpp b/lib/SvelteUi/src/AmsWebServer.cpp index 5ad5000b..d5ea909d 100644 --- a/lib/SvelteUi/src/AmsWebServer.cpp +++ b/lib/SvelteUi/src/AmsWebServer.cpp @@ -2019,6 +2019,7 @@ void AmsWebServer::configFileDownload() { server.sendContent(buf, snprintf_P(buf, BufferSize, PSTR("entsoeArea %s\n"), entsoe.area)); server.sendContent(buf, snprintf_P(buf, BufferSize, PSTR("entsoeCurrency %s\n"), entsoe.currency)); server.sendContent(buf, snprintf_P(buf, BufferSize, PSTR("entsoeMultiplier %.3f\n"), entsoe.multiplier / 1000.0)); + server.sendContent(buf, snprintf_P(buf, BufferSize, PSTR("entsoeFixedPrice %.3f\n"), entsoe.fixedPrice / 1000.0)); } if(includeThresholds) { diff --git a/src/AmsToMqttBridge.ino b/src/AmsToMqttBridge.ino index c80123c2..8fa8e396 100644 --- a/src/AmsToMqttBridge.ino +++ b/src/AmsToMqttBridge.ino @@ -1967,6 +1967,9 @@ void configFileParse() { } else if(strncmp_P(buf, PSTR("entsoeMultiplier "), 17) == 0) { if(!lEntsoe) { config.getEntsoeConfig(entsoe); lEntsoe = true; }; entsoe.multiplier = String(buf+17).toFloat() * 1000; + } else if(strncmp_P(buf, PSTR("entsoeFixedPrice "), 17) == 0) { + if(!lEntsoe) { config.getEntsoeConfig(entsoe); lEntsoe = true; }; + entsoe.fixedPrice = String(buf+17).toFloat() * 1000; } else if(strncmp_P(buf, PSTR("thresholds "), 11) == 0) { if(!lEac) { config.getEnergyAccountingConfig(eac); lEac = true; }; int i = 0;