When writing scripts via the UI, there is a variable called ctx. Is it possible to get the context in a rule created using rules.JSRule?
Even for UI rules, as of OH 5.1, you should use event.raw in place of ctx.
1 Like