DSL Scripts and Rules: allow usage of org.openhab.core.automation.RuleManager#5484
Conversation
|
Why not ? |
|
@Nadahar: is it something needed/expected for what is discussed about future for DSL rule/script? |
|
This is done/needed in #5481 for the I assume that @dilyanpalauzov knows why it's also needed for the |
|
It is needed in the scripts bundle, so that the above example can be executed in DSL Scripts, outside of DSL Rules. (You can try youself the snippet before and after changing |
Yes, it's easier, and #5481 also does many other things, like allowing to easily edit Item metadata for example. But, that doesn't make this "useless". This makes it possible to resolve classes in the What I don't know is why you'd want to do it from DSL scripts that isn't part of a rule, but that doesn't mean that it's wrong to make it possible. |
E.g., access Item metadata in a DSL transformation to decide how to transform something. |
Writing DSL Script, which is part (action) of a UI rule, and thus not part of a DSL Rule, also needs the change in code.model.script/bnd.bnd. Compare to the problem description of #4784. |
|
FTR: small patch exception |
The changeset allows running from DSL Rules and DSL Sctipts a rule: