Blockly - return block for rule condition



when creating a rule I can use Blockly to execute a script as rule action, but I can also use Blockly to execute a script as rule condition.

As rule condition the script needs to return true or false, but I have not find any “return” block so far.
Am I missing something or is this worth to also consider for next release?


It’s not return a boolean, the last line of the script needs to evaluate to a boolean.

In code, instead of

if(x < 5) return true
else return false

or something like that, you’d have

x < 5

You should be able to do that in Blockly now I think.

Thanks, that’s super helpful.

So you simply used as last block this one?


Without connecting it to any other block.


1 Like