nfarina / homebridge-dummy

Dummy switches for Homebridge: https://github.com/nfarina/homebridge
267 stars 81 forks source link

Resettable timer #36

Closed mikehhhhhhh closed 3 years ago

mikehhhhhhh commented 3 years ago

This PR adds a resettable config flag, that will reset the timer each time the switch is set to on.

Use case: I want a light to turn off 60 seconds after the last detected motion. (Like #29, also solves #26)

Each time motion is detected, the timer will be reset.

mikehhhhhhh commented 3 years ago

Hi @nfarina could you let me know whether you intend to accept the PR? I'd like to publish my own to use it if not.

nfarina commented 3 years ago

Hey Mike, sorry for the delay! I haven't used this plugin in a while so I'm not as on top of things. This looks great though - will merge and publish shortly. Thanks!

ru-van-urk commented 2 years ago

Hi @mikehhhhhhh

I am trying to achieve the same thing as you but I cannot figure it out. Do you have a working solution?

Thanks in advance