Show current export price in export gauge

This commit is contained in:
Gunnar Skjold
2024-04-14 14:47:53 +02:00
parent 3a980fac4c
commit ce67ef2bea
6 changed files with 47 additions and 33 deletions

View File

@@ -516,6 +516,7 @@ void AmsWebServer::dataJson() {
}
float price = ea->getPriceForHour(PRICE_DIRECTION_IMPORT, 0);
float exportPrice = ea->getPriceForHour(PRICE_DIRECTION_EXPORT, 0);
String peaks = "";
for(uint8_t i = 1; i <= ea->getConfig()->hours; i++) {
@@ -569,6 +570,7 @@ void AmsWebServer::dataJson() {
mqttStatus,
mqttHandler == NULL ? 0 : (int) mqttHandler->lastError(),
price == PRICE_NO_VALUE ? "null" : String(price, 2).c_str(),
exportPrice == PRICE_NO_VALUE ? "null" : String(exportPrice, 2).c_str(),
meterState->getMeterType(),
distributionSystem,
ea->getMonthMax(),