With this PR, the JSRule API adds additional information to the rule‘s action, so that MainUI is able to display a rule‘s source code.
Due to the lack of direct access to the rules source code, a utility function is used to regenerate the source code from the given rule configuration.
Therefore, the generated code does not work for the RuleBuilder API, as this is using JSRule under the hood.
Testing
This PR requires additional testing from my side, as well as an update of the type defintions.
Fixes https://github.com/openhab/openhab-addons/issues/12929.
Description
With this PR, the
JSRule
API adds additional information to the rule‘s action, so that MainUI is able to display a rule‘s source code. Due to the lack of direct access to the rules source code, a utility function is used to regenerate the source code from the given rule configuration. Therefore, the generated code does not work for theRuleBuilder
API, as this is usingJSRule
under the hood.Testing
This PR requires additional testing from my side, as well as an update of the type defintions.