Trying stuff to get build working

This commit is contained in:
Gunnar Skjold
2023-01-17 18:34:47 +01:00
parent fb2cfdfe01
commit 7a36082564
3 changed files with 6 additions and 2 deletions

View File

@@ -280,7 +280,11 @@ bool HomeAssistantMqttHandler::publishSystem(HwTools* hw, EntsoeApi* eapi, Energ
String uom = String(sensor.uom);
if(strncmp(sensor.devcl, "monetary", 8) == 0) {
if(eapi == NULL) continue;
uom = String(eapi->getCurrency());
if(strncmp(sensor.path, "prices", 5) == 0) {
uom = String(eapi->getCurrency()) + "/kWh";
} else {
uom = String(eapi->getCurrency());
}
}
if(strncmp(sensor.path, "peaks[", 6) == 0) {
if(peaks >= peakCount) continue;