openhab-scripters / openhab-helper-libraries

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

Initial submission of a Countdown Timer implementation #237

Closed rkoshak closed 3 years ago

rkoshak commented 4 years ago

This is a module that has a class to implement a countdown timer. It creates a timer that loops every second, updating a passed in Item with the amount of time left on the Timer so people can see how much time is left on their sitemaps and such.

A Number Item or a String Item can be passed to receive the time left updates. If a Number, the number of seconds (rounded to the nearest second) remaining updates the Item. If a String Item, the result of str on the datetime.timedelta Item get's returned, again rounded to the nearest second. The timer itself though will expire on the scheduled millisecond

Signed-off-by: Rich Koshak rlkoshak@gmail.com

rkoshak commented 4 years ago

This PR is ready for review

rkoshak commented 3 years ago

I've basically completely rewritten this so am closing this PR. When reviewing submissions to the helper library becomes a priority I'll resubmit. In the mean time I'll keep in in my own repo where I can continue development.