Edit: I’ve reimplemented this and am hosting it on my own repo instead of as a submission to the helper libraries.
As a challenge to myself I wanted to see if I could replace the Expire binding using Rules. The answer appears to be yes.
See https://github.com/rkoshak/openhab-rules-tools for a drop in replacement to the Expire binding. You don’t even need to change your Item configs. The rules will pick up your existing Expire binding configs and use them.
The only limitation is you must cause OH to recreate the rule when you make a change to any Expire binding config to pick up those changes. A new
Reload_Expire Switch Item will be created that will do this for you when it receives an ON command. Or in PaperUI you can manually run the
Reload Expire rule.
I don’t expect this to be a permanent replacement for the binding. Instead it can be a bridge for those who want to get off of the 1.x binding before there is a 3.x replacement in place. The 3.x replacement is likely to require changes to your Items and/or your Rules.
I’d love it if a few of you could try it out and tell me if there are any bugs. I tested it pretty heavily on my own system but it’s impossible for one developer to think of everything.