Data Types
Last updated
Last updated
© 2023 MOOST AG
In the Values section featured already some data types. Each literal has a specific data type. Here you see the full list:
Literal | Description |
---|---|
A decimal number
A time which consists of date and day time.
Besides of event times, we can also use one of following supported literals:
A timespan.
A timespan literal is a combination of a number and a time unit. Following time units are supported:
A text element
Everything that begins and ends with a single or double quotation mark is considered a text element. This also includes elements that cannot be assigned to one of the other data types. For example, if $Event was used but no such variable was defined, it would also be considered a text element.
Remark: we recommend to use one of the quoted forms, which makes it crystal clear for the readers that this is a text.
An event, which consists of:
When the rule has the "Streak" feature enabled, then the literal "StreakCounter" returns the current streak of this rule. It is of type Number.
See Streakfor more details about the Streak feature.
Literal | Description |
---|---|
Literal | Description |
---|---|
Attributes | Description |
---|---|
The building related to the event, so that building related data can be accessed via Attribute Accessor, see:.
Attributes | Description |
---|---|
true
Value for true / fulfilled
false
Value for false / not fulfilled
now
The current time. This produces e.g. 2023-09-25 23:26
lastHour
The last full hour. E.g. 2023-09-25 23:00
lastZeroHour
The last zero hour (midnight). E.g. 2023-09-25 00:00
startOfLastMonth
The first day of the previous month. E.g. 2024-05-01 00:00
endOfLastMonth
The last day of the previous month. E.g. 2024-05-31 00:00
startOfCurrentMonth
The first day of the current month. E.g. 2024-06-01 00:00
endOfCurrentMonth
The last day of the current month. E.g. 2024-06-30 00:00
d
Days
h
Hours
min
Minutes
s
Seconds
Value
The value of the event, which is of type Number
Timestamp
The timestamp of the event, which is of type Time
DeviceName
The name of the device which is the source of this event. It is of the of type Text
DeviceId
The ID of the device, which is the source of this event. It is of the of type Text
Id
The value of the event, which is of type Text
RegistrationTimestamp
The timestamp when the building was registered, i.e. the on-boarding timestamp on the customer side. It is of type Time
DeviceTypes
The set of device types (which relates to the "source" entries in the events). It is a Vector of type Text.