– are almost the same as when blocks. They also consist of events of the same structure, but they have a few differences:
- they don’t affect scene execution;
- their states are evaluated during creation.
They are used for foreign mechanisms dependent on block states (e.g. exceptions in actions).
- block json representation:
|Options of the block
|Json representation of the function for triggering
|Json object with the names of the fields that must be extracted from the list
|Describes the event type. Possible values: see below
|Name of the block type. Should be set as “when”
|Block metadata info
|User name of block
|ID of an action group that this “when” block is linked to. Must be unique within the space of “when” blocks. After scene creation the value is replaced with the ID of the “when” block.
|Array of the triggers. There is used the same format as it is in the then block but item address, values etc
|Represents the Item Value Type, or can be set to to represent an expression value.
|Any Json Value
|Actual value corresponding the field name. In case of an item it is a constant representation of an item value to compare changed item value with. In case of “expression” type, the “value” field should contain a name of an expression (see Scenes expression related commands.