Timer binding proof of concept

It will and already does.

As an example for how that’s not strictly necessary see Jython Drop-in Replacement for Expire 1.x Binding. As a challenge I wrote a drop in replacement for the Expire binding using Scripted Automation. And by drop in I mean drop in, you don’t need to do anything except leave your expire configs on your Items. The rules do the rest. So yes, you can write a Rule and attach the Item to the Rule the same way you would to a binding. In this case, the expire binding config turns into Item Metadata when you uninstall the binding. Item metadata is available in Rules so I can iterate over all the Items that have an expire tag and dynamically create triggers to a Rule or Timers or whatever for those Items.

I’m not proposing this as an approach to use for this topic in particular, I only bring it up as an example for how a lot of the limitations one has with Rules DSL are not there in Scripted Automation.

2 Likes