Skip to content

armgit / core

Public Imported from GitHub
0

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

Changed attribute types for weather asset

Michael Rademakerdb26745b7f40
diff --git a/model/src/main/java/org/openremote/model/asset/impl/WeatherAsset.java b/model/src/main/java/org/openremote/model/asset/impl/WeatherAsset.java
index 4205c6687..5e6e9125a 100644
--- a/model/src/main/java/org/openremote/model/asset/impl/WeatherAsset.java
+++ b/model/src/main/java/org/openremote/model/asset/impl/WeatherAsset.java
@@ -38,20 +38,20 @@ public class WeatherAsset extends Asset<WeatherAsset> {
public static final AttributeDescriptor<Double> TEMPERATURE = new AttributeDescriptor<>("temperature", ValueType.NUMBER,
new MetaItem<>(MetaItemType.READ_ONLY)
).withUnits(UNITS_CELSIUS);
- public static final AttributeDescriptor<Integer> UV_INDEX = new AttributeDescriptor<>("uVIndex", ValueType.POSITIVE_INTEGER,
+ public static final AttributeDescriptor<Double> UV_INDEX = new AttributeDescriptor<>("uVIndex", ValueType.POSITIVE_NUMBER,
new MetaItem<>(MetaItemType.LABEL, "UV index"),
new MetaItem<>(MetaItemType.READ_ONLY)
);
- public static final AttributeDescriptor<Integer> SUN_IRRADIANCE = new AttributeDescriptor<>("sunIrradiance", ValueType.POSITIVE_INTEGER,
+ public static final AttributeDescriptor<Double> SUN_IRRADIANCE = new AttributeDescriptor<>("sunIrradiance", ValueType.POSITIVE_NUMBER,
new MetaItem<>(MetaItemType.READ_ONLY)
);
- public static final AttributeDescriptor<Integer> SUN_AZIMUTH = new AttributeDescriptor<>("sunAzimuth", ValueType.POSITIVE_INTEGER,
+ public static final AttributeDescriptor<Double> SUN_AZIMUTH = new AttributeDescriptor<>("sunAzimuth", ValueType.POSITIVE_NUMBER,
new MetaItem<>(MetaItemType.READ_ONLY)
);
- public static final AttributeDescriptor<Integer> SUN_ZENITH = new AttributeDescriptor<>("sunZenith", ValueType.POSITIVE_INTEGER,
+ public static final AttributeDescriptor<Double> SUN_ZENITH = new AttributeDescriptor<>("sunZenith", ValueType.POSITIVE_NUMBER,
new MetaItem<>(MetaItemType.READ_ONLY)
);
- public static final AttributeDescriptor<Integer> SUN_ALTITUDE = new AttributeDescriptor<>("sunAltitude", ValueType.POSITIVE_INTEGER,
+ public static final AttributeDescriptor<Double> SUN_ALTITUDE = new AttributeDescriptor<>("sunAltitude", ValueType.POSITIVE_NUMBER,
new MetaItem<>(MetaItemType.READ_ONLY)
);
public static final AttributeDescriptor<Double> WIND_SPEED = new AttributeDescriptor<>("windSpeed", ValueType.POSITIVE_NUMBER,
@@ -84,23 +84,23 @@ public class WeatherAsset extends Asset<WeatherAsset> {
return getAttributes().getValue(TEMPERATURE);
}
- public Optional<Integer> getUVIndex() {
+ public Optional<Double> getUVIndex() {
return getAttributes().getValue(UV_INDEX);
}
- public Optional<Integer> getSunIrradiance() {
+ public Optional<Double> getSunIrradiance() {
return getAttributes().getValue(SUN_IRRADIANCE);
}
- public Optional<Integer> getSunAzimuth() {
+ public Optional<Double> getSunAzimuth() {
return getAttributes().getValue(SUN_AZIMUTH);
}
- public Optional<Integer> getSunZenith() {
+ public Optional<Double> getSunZenith() {
return getAttributes().getValue(SUN_ZENITH);
}
- public Optional<Integer> getSunAltitude() {
+ public Optional<Double> getSunAltitude() {
return getAttributes().getValue(SUN_ALTITUDE);
}