Some updates for price fetching

This commit is contained in:
Gunnar Skjold
2023-11-05 10:24:42 +01:00
parent 63c3d31552
commit 445973f9ce
10 changed files with 90 additions and 51 deletions

View File

@@ -668,6 +668,7 @@ void AmsWebServer::energyPriceJson() {
snprintf_P(buf, BufferSize, ENERGYPRICE_JSON,
eapi == NULL ? "" : eapi->getCurrency(),
eapi == NULL ? "" : eapi->getSource(),
prices[0] == ENTSOE_NO_VALUE ? "null" : String(prices[0], 4).c_str(),
prices[1] == ENTSOE_NO_VALUE ? "null" : String(prices[1], 4).c_str(),
prices[2] == ENTSOE_NO_VALUE ? "null" : String(prices[2], 4).c_str(),