|  Developer
Updated on November 22, 2021

Then blocks

  • block currently supports one or several actions and execution of these actions is provided in order is set in array of block.
Field Type Required Description
blockOptions JsonObject + Action block options
blockOptions.method JsonObject + Action description
blockOptions.method.args JsonObject + Action description arguments that should be read from attribute
blockOptions.method.name string + Name of action
fields JsonArray + Array of fields that must be extracted by the names
fields[].name string + Name of the field block corresponding of the declaration in
fields[].type string Represents the Item Value Type
fields[].value string + Value should be corresponded to the
delay JsonObject Delay to action after event arises. If this field is absent or is empty then delay is absent.
delay.seconds int Seconds number of delay
delay.minutes int Minutes number of delay
delay.hours int Hours number of delay
delay.days int Days number of delay
exec_policy string It is execution policy of block. The block policy have higher priority then policy of scene ( see description of hub.scenes.create ). If block policy is absent then block inherits policy of scene. The block policy can have next states: – result of execution each block should checked and scene should be failed in case if block is failed; – result of execution each block should be ignored and checked only in the end of scene execution. If any action was failed than partially_finished status. If all blocks have this status and all of them are failed than failed status.