ccutrer / openhab-jrubyscripting

JRuby Libraries for Openhab
Eclipse Public License 2.0
1 stars 1 forks source link

Debounce #149

Closed jimtng closed 1 year ago

jimtng commented 1 year ago

Resolve #129 also https://github.com/boc-tothefuture/openhab-jruby/issues/356

jimtng commented 1 year ago

I've updated the PR:

rule do
  updated X
  debounce for: 1.minute, leading: true # this supports extra parameters
  run {}
end

# or

rule do
  updated X
  only_every :minute # this doesn't support the extra parameters
  run {}
end

I think this is ready to be reviewed now.

jimtng commented 1 year ago

Waiting on #152

ccutrer commented 1 year ago

I squashed your last two commits together, changed the reset to be relative to now (instead of fixed at 1900) and fixed some minor formatting and grammar issues in docs.