Rules and return codes

Yeah - the only reason I never made any documentation is that it’s all supposed to change if the “new YAML” PR is ever merged.

Right, which is why I’m surprised event.raw.payload is undefined. Still need to look into it. :person_shrugging:

I hope we somehow get some movement on those PRs too.

Yes I remember it too - thanks for the mention btw, great discussion here.

It’s true that it’s easy to consider a condition script as the body of a function (after all you have parameters and you are expected to return something) so having return <something> statements would make sense but it turns out it’s not how it works.

Just FYI I have started working on the required changes.

The core PRs and the PR to make the event conversion independent of the wrapper are merged.
The PR for changing the wrapper behaviour and adding the directive is open: https://github.com/openhab/openhab-addons/pull/19443

This PR adds the return block to Blockly (and also adapts to the new event attributes).

https://github.com/openhab/openhab-webui/pull/3376