Threshold Alert and Open Reminder [4.0.0.0;5.9.9.9]

This is on the “todo” list. I’ve just not gotten around to it. I’ve been handling this through expire and my “restart expire” rule template. That rule fires on system started and updates an Item with it’s restored state. Because the rules are running at this point instead of when the Item was first restored, it kicks off the threshold alert rules in addition to restarting the expire timers.

Most of my free time these days have been used up by eliminating technical debt built up over a decade in my home lab. I’m also waiting for the new YAML format to be supported by the marketplace so the development process will become much improved (I can modify and test locally and then upload the actual file that I tested with instead of what needs to be done now).

But soon I intend to return to my rule templates and rework them and add this feature in. I’ll take a look at the PR though and merge it if it doesn’t prevent me from achieving one of my other todos in the future. I really appreciate the contribution!

Edit: I’ve reviewed the PR. There are a few changes requested but overall it looks good. Thanks!

Hey @rlkoshak,

Thanks for the comments and good catch. I addressed your comments and updated the pull request.

Cheers,
Flo

PR is merged and first post is updated.

The upgrade procedure is the same as usual:

  1. Navigate to Add-on Store → Automation and removed the Threshold Alert and Open Reminder rule template, refresh, then readd to pull the latest template.
  2. Navigate to Settings → Rules
  3. Filter on the tag “Marketplace” and find all the ones with the “Marketplace:144863” tag (these are the rules created from, this tempalte).
  4. Click the purple “Regenerate” button in the bottom right.

If you’ve rules instantiated from the template prior to OH 5.0 (or you are running a version of OH prior to that) you will need to delete the old rule and create it anew. Open the code tab and copy the “Configuration” section to to remember the settings you made for that instance of the rule so you can recreate it with the same properties.