Skip to content

armgit / core

Public Imported from GitHub
0

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

Added powerForecast to ElectricityConsumerAsset #534

Michael Rademakerb614d8889805
diff --git a/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java b/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java
index 41e9fdd6d..57e4e3b8a 100644
--- a/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java
+++ b/model/src/main/java/org/openremote/model/asset/impl/ElectricityConsumerAsset.java
@@ -24,6 +24,9 @@ import org.openremote.model.value.*;
import javax.persistence.Entity;
+import static org.openremote.model.Constants.UNITS_KILO;
+import static org.openremote.model.Constants.UNITS_WATT;
+
@Entity
public class ElectricityConsumerAsset extends ElectricityAsset<ElectricityConsumerAsset> {
@@ -41,6 +44,9 @@ public class ElectricityConsumerAsset extends ElectricityAsset<ElectricityConsum
public static final AttributeDescriptor<Double> TARIFF_EXPORT = ElectricitySupplierAsset.TARIFF_EXPORT.withOptional(true);
public static final AttributeDescriptor<Double> CARBON_IMPORT = ElectricitySupplierAsset.CARBON_IMPORT.withOptional(true);
+ public static final AttributeDescriptor<Double> POWER_FORECAST = new AttributeDescriptor<>("powerForecast", ValueType.NUMBER
+ ).withUnits(UNITS_KILO, UNITS_WATT);
+
/**
* For use by hydrators (i.e. JPA/Jackson)
*/