Field Type Required Description
name string + An expression name. Should be unique across all the scenes.
code string + Lua code snippet to be run within a scene (Max 5 kb for Linux and 1 kb for Atom)
params object Expression parameters
params.items array of objects An array of an expression parameter name and item identifier pairs.
params.items[index].name string + A parameter name to use in an expression. A value of an item can be referred from an expression as .
params.items[index]._id string + An item identifier to get value from
params.device_item_names array of objects An array of an expression parameter name, device name and item item name objects.
params.device_item_names[index].name string + A parameter name to use in an expression. A value of an item can be referred from an expression as .
params.device_item_names[index].deviceName string + A device name to get items from
params.device_item_names[index].itemName string + An item name from the device pointed by , to use in an expression
valueType string A type of value returned by an expression. Required for expressions used by the Scenes Engine. If set, the Lua code should return only values, from which the variable of a given value type can be constructed. The valueType field can have any value the firmware exposes as an item value type.
metadata object Metadata bound to an expression. Can be JSON object type. If null, should not be stored.
variable boolean If , the expression is a variable. Variables should be separated in the UI from other expressions. If a is , the expression cannot get any data sources from outside (devices, items), and is supposed to save a constant never-changing value.
value any type Expression value