Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Negate the current values

Michael Rademakerd95ea6c09e91
diff --git a/manager/src/main/java/org/openremote/manager/energy/ForecastWindService.java b/manager/src/main/java/org/openremote/manager/energy/ForecastWindService.java
index 563a5d014..4fc6f7b2a 100644
--- a/manager/src/main/java/org/openremote/manager/energy/ForecastWindService.java
+++ b/manager/src/main/java/org/openremote/manager/energy/ForecastWindService.java
@@ -268,10 +268,10 @@ public class ForecastWindService extends RouteBuilder implements ContainerServic
double currentPower = calculatePower(electricityProducerWindAsset, weatherForecastResponseModel.current);
- assetProcessingService.sendAttributeEvent(new AttributeEvent(electricityProducerWindAsset.getId(), ElectricityProducerAsset.POWER_FORECAST.getName(), currentPower));
+ assetProcessingService.sendAttributeEvent(new AttributeEvent(electricityProducerWindAsset.getId(), ElectricityProducerAsset.POWER_FORECAST.getName(), -currentPower));
if (electricityProducerWindAsset.isSetActualValueWithForecast().orElse(false)) {
- assetProcessingService.sendAttributeEvent(new AttributeEvent(electricityProducerWindAsset.getId(), ElectricityProducerAsset.POWER.getName(), currentPower));
+ assetProcessingService.sendAttributeEvent(new AttributeEvent(electricityProducerWindAsset.getId(), ElectricityProducerAsset.POWER.getName(), -currentPower));
}
for (WeatherForecastModel weatherForecastModel : weatherForecastResponseModel.getList()) {