openhab-scripters / openhab-helper-libraries

Scripts and modules for use with openHAB
Eclipse Public License 1.0
88 stars 69 forks source link

Submit the Gatekeeper Design Pattern to the library #220

Closed rkoshak closed 3 years ago

rkoshak commented 4 years ago

Is your feature request related to a problem? Please describe. Implement the Gatekeeper design pattern which applies to cases where one needs to rate limit or enforce a pause after executing one command before issuing another command. This can be useful in technologies like RF433 or the say action.

Describe the solution you'd like Provide this as a library capability so users do not need to copy/paste/implement this common requirement on their own.

Describe alternatives you've considered Forum posting, adding it to the Design Patterns section of the docs. But I've implemented the DP in a generic and reusable way which will let users simply reuse the code instead of needing to copy and use it themselves.

Additional context See https://community.openhab.org/t/design-pattern-gate-keeper/36483 for the initial impelmentation, a PR is to follow shortly with a documented version with tests that more closely follows the Python style guide.

5iver commented 3 years ago

232