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
  • Description
  • Number|Event + Number|Event
  • Time + Timespan
  • Timespan + Timespan
  • Text + any
  • Examples
Export as PDF
  1. Platform Manual
  2. Rules
  3. Rule Language
  4. Operations

Plus

Description

Adding or concat two values with each other.

Number|Event + Number|Event

Scalar<Number|Event> + Scalar<Number|Event> : Scalar<Number>
Scalar<Number|Event> + GroupedScalar<Number|Event> : GroupedScalar<Number>
GroupedScalar<Number|Event> + Scalar<Number|Event> : GroupedScalar<Number>
GroupedScalar<Number|Event> + GroupedScalar<Number|Event> : GroupedScalar<Number>

Two arguments of type Scalar<Numbers> added to each other result in a Scalar<Number> which is the sum of both arguments.

If one argument is a Scalar, and the other one a GroupedScalar, then the operation is performed by taking the Scalar value and the value of each group value, which results another GroupedScalar (it has same group size, as the one from the input argument).

If both arguments are GroupedScalar, then the operation is performed by taking values with same group key, which results in another Grouped Scalar (the group size is equal or smaller than the ones of the input arguments).


Time + Timespan

Scalar<Time> + Scalar<Timespan> : Scalar<Time>
Scalar<Time> + GroupedScalar<Timespan> : GroupedScalar<Time>
GroupedScalar<Time> + Scalar<Timespan> : GroupedScalar<Time>
GroupedScalar<Time> + GroupedScalar<Timespan> : GroupedScalar<Time>

Adding a Scalar<Time> with a Scalar<Timespan> results in a Scalar<Time> which is a point in time after the Scalar<Time>.


Timespan + Timespan

Scalar<Timespan> + Scalar<Timespan> : Scalar<Time>
Scalar<Timespan> + GroupedScalar<Timespan> : GroupedScalar<Time>
GroupedScalar<Timespan> + Scalar<Timespan> : GroupedScalar<Time>
GroupedScalar<Timespan> + GroupedScalar<Timespan> : GroupedScalar<Time>

Adding a Scalar<Timespan> to a Scalar<Time> results in a Scalar<Time> which is far more in the future as stated by the Scalar<Timespan>


Text + any

Scalar<Text> + Scalar<any> : Scalar<Text>
Scalar<Text> + Vector<any> : Scalar<Text>
Scalar<Text> + GroupedScalar<any> : Scalar<Text>
Scalar<Text> + GroupedVector<any> : Scalar<Text>
Vector<Text> + Scalar<any> : Scalar<Text>
Vector<Text> + Vector<any> : Scalar<Text>
Vector<Text> + GroupedScalar<any> : Scalar<Text>
Vector<Text> + GroupedVector<any> : Scalar<Text>
GroupedScalar<Text> + Scalar<any> : Scalar<Text>
GroupedScalar<Text> + Vector<any> : Scalar<Text>
GroupedScalar<Text> + GroupedScalar<any> : Scalar<Text>
GroupedScalar<Text> + GroupedVector<any> : Scalar<Text>
GroupedVector<Text> + Scalar<any> : Scalar<Text>
GroupedVector<Text> + Vector<any> : Scalar<Text>
GroupedVector<Text> + GroupedScalar<any> : Scalar<Text>
GroupedVector<Text> + GroupedVector<any> : Scala

Adding a scalar or vector of type Boolean, Number, Time, Timespan, Text to a scalar or vector of type Text results in a new Scalar<Text with concatenated text elements. Non-text elements are implicitly formatted (see #format-or). Vector elements are joined with commas.

Examples

Calculating 1 + 2 equals 3

1+2

Adding 8 hours to the last full hour results in 13:00 o'clock, when the lastZeroHour was 5:00 o'clock.

lastZeroHour + 8h

Adding 30min to 1h results in 1h30m

1h + 30min

Concat Text with the result of a function

'Consumption' + SUM($PowerConsumption) + ' W'

PreviousOperationsNextMinus

Last updated 1 year ago