ValueModelFormula
- expressionType: stringmax length:1000required
The units one signal is worth: an expression of numbers, variables,
+ - * /, parentheses, comparisons (<,<=,>,>=,==,!=, which give 1 when true and 0 otherwise) and the functionsmin,max,abs,floor,ceil,round(x, digits)andif(condition, then, else). A variable is one of the formula'svariables, else a dotted path into the signal's data (such asusage.minutes); a missing or non-numeric one counts as 0.1counts one unit per signal. An expression that can't be evaluated is refused withUNSUPPORTED_FORMULA. - idType: stringrequired
Unique within the document; signals name it in
formulaId. - valueType: string
Type Slug requiredThe value type this formula belongs to.
- Properties: 7variablesType:required
- conditionsType:Properties: 4
Condition bands, tried in order. The first that matches gives the units instead of
expression; when none does,defaultResultdoes if set, elseexpression. - defaultType:
Result Properties: 3What a condition band (or a formula's
defaultResult) gives: a constant, or an expression over the same variables. - labelType: string
- propertyadditionalPropertyType: anything
Name