Closed simonihmig closed 3 years ago
Hm, seems my IDE doesn't like the trailing spaces. Which makes the diff a bit confusing. Hope you don't mind?
No worries about the spaces and thanks!
@jpg0 seems this change was lost by your commit here: https://github.com/jpg0/ohj/commit/791e3c82eaef124bacb8d6d3fcd31431a3177dae 😬
Ah sorry. Things are a bit of a mess atm because I planned to upgrade everything to OH3, then had to abandon upgrading due to https://github.com/openhab/openhab-core/issues/2002
I'll fix this now
The code block example suggests passing a single trigger instance is possible (see https://github.com/jpg0/ohj/blob/master/rules.js#L91), but it had to be an array actually. This change now accepts both. I believe that's reasonable, as many rules will have just a single trigger (e.g. cron), so having to wrap in an array explicitly might be annoying.