Skip to content

armgit / core

Public Imported from GitHub
0

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

Added DIRECTION_DECIMAL_DEGREES AttributeType

Rich Turner8199c613b3a7
diff --git a/client/src/main/resources/org/openremote/app/client/i18n/ManagerMessages.properties b/client/src/main/resources/org/openremote/app/client/i18n/ManagerMessages.properties
index 3ccfab17a..57b44b5d2 100644
--- a/client/src/main/resources/org/openremote/app/client/i18n/ManagerMessages.properties
+++ b/client/src/main/resources/org/openremote/app/client/i18n/ManagerMessages.properties
@@ -221,6 +221,7 @@ attributeType[TIME_SECONDS]=Time seconds
attributeType[TIME_MINUTES]=Time minutes
attributeType[RAINFALL]=Rainfall millimetres per hour
attributeType[BRIGHTNESS_LUX]=Lux brightness
+attributeType[DIRECTION_DECIMAL_DEGREES]=Direction in decimal degrees
validationFailureOnAttribute=Attribute error on ''{0}''
validationFailureOnMetaItem=Meta item error on ''{0}'' meta item ''{1}''
validationFailure=Unknown validation failure.
diff --git a/model/src/main/java/org/openremote/model/attribute/AttributeType.java b/model/src/main/java/org/openremote/model/attribute/AttributeType.java
index 5f0ac69de..3ed41b640 100644
--- a/model/src/main/java/org/openremote/model/attribute/AttributeType.java
+++ b/model/src/main/java/org/openremote/model/attribute/AttributeType.java
@@ -235,6 +235,10 @@ public enum AttributeType {
FLOW_GPM("tachometer", ValueType.NUMBER, value -> Optional.empty(),
new MetaItem(FORMAT, Values.create("%0.5f gpm"))
+ ),
+
+ DIRECTION_DECIMAL_DEGREES("compass", ValueType.NUMBER, value -> Optional.empty(),
+ new MetaItem(FORMAT, Values.create("%0.1f deg"))
);
public static final String DEFAULT_ICON = "circle-thin";