LogoLogo
  • Welcome to the MOOST platform user manual
  • Platform Manual
    • Login
      • Forgot Password
    • Notifications
    • Rules
      • Rule Configurator
        • Data graph
        • Datasets
        • Condition
        • Streak
        • Message
        • Settings
        • Rule Simulator
        • Early Adopter
        • Command
      • Rule Language
        • Syntax
        • Data Types
        • Data Structures
        • Functions
          • AVG
          • COUNT
          • DISTINCT
          • EVAL
          • FILTER
          • GROUP_BY_DEVICE
          • GROUP_BY_TIME
          • MAX
          • MIN
          • POSITION
          • REVERSE
          • SORT
          • SUBSET
          • SUM
        • Operations
          • Plus
          • Minus
          • Multiply
          • Divide
          • Negate
          • Less Than
          • Less or Equal
          • Equal
          • Not Equal
          • Greater or Equal
          • Greater
          • AND
          • OR
          • NOT
          • Format
          • Attribute Accessor
        • Examples
    • Events
    • Buildings
      • Household Profile
    • User Profile
    • Billing Portal
      • Payment Method
      • Update Payment Address
      • Invoices
      • Terminate Subscription
    • Context Services
      • Weather Forecast
      • Solar Production Forecast
      • Power Consumption Forecast
      • Power Generation Forecast
    • Support Center
  • Technical Integration
    • Cloud-to-Cloud Integration
      • Platform On-boarding
      • Configure Notification Settings
        • Receive Notifications
          • iOS Notification Handling
      • MOOST API Integration
        • Request Access Token
        • Synchronize Buildings and Devices
          • Device Types
        • Forward Events
          • Event Types
            • Device Status
            • Charging Modes
            • Switch State
        • Notifications and Interactions
          • Return Notification Interaction
  • Best Practices
    • FAQ
    • User Acceptance Testing
  • Policies
    • Security Policy
    • Privacy Policy
Powered by GitBook

© 2025 MOOST AG

On this page
  • Boolean
  • Examples
  • Number
  • Examples
  • Time
  • Examples
  • Timespan
  • Examples
  • Text
  • Examples
  • Event
  • Examples:
  • Building
  • Examples:
  • StreakCounter
  • Examples
Export as PDF
  1. Platform Manual
  2. Rules
  3. Rule Language

Data Types

PreviousSyntaxNextData Structures

Last updated 3 months ago

In the featured already some data types. Each literal has a specific data type. Here you see the full list:

Boolean

Literal
Description

true

Value for true / fulfilled

false

Value for false / not fulfilled

Examples

true
AVG($PowerConsumption) > 1000

Number

A decimal number

Examples

42.0
$Event::Value * 1.5

Time

A time which consists of date and day time.

Besides of event times, we can also use one of following supported literals:

Literal
Description

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

startOfMonthBeforeLast

The first day of the penultimate month E.g. 2024-04-01 00:00

endOfMonthBeforeLast

The last day of the penultimate month E.g. 2024-04-30 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

Examples

$Event::Timestamp
now - 24h

Timespan

A timespan.

A timespan literal is a combination of a number and a time unit. Following time units are supported:

Literal
Description

d

Days

h

Hours

min

Minutes

s

Seconds

Examples

7d
24h
30min

Text

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.

Examples

'foo'
"bar"
foo

Event

An event, which consists of:

Attributes
Description

Value

Timestamp

DeviceName

DeviceId

Examples:

$Event::DeviceName

Building

Attributes
Description

Id

RegistrationTimestamp

DeviceTypes

Examples:

Building::DeviceTypes

StreakCounter

See Streakfor more details about the Streak feature.

Examples

StreakCounter

The value of the event, which is of type

The timestamp of the event, which is of type

The name of the device which is the source of this event. It is of the of type

The ID of the device, which is the source of this event. It is of the of type

The building related to the event, so that building related data can be accessed via Attribute Accessor, see:.

The value of the event, which is of type

The timestamp when the building was registered, i.e. the on-boarding timestamp on the customer side. It is of type

The set of device types (which relates to the "source" entries in the events). It is a Vector of type .

When the rule has the "Streak" feature enabled, then the literal "StreakCounter" returns the current streak of this rule. It is of type .

Number
Number
Time
Text
Text
Text
Time
Text
Values section
#accessor-on-building