alexjsp / homebridge-plex-sensors

Homebridge Sensors for Plex - a plugin for Homebridge to adds sensors triggered by Plex playbacks.
MIT License
110 stars 10 forks source link

Add a delay option for untriggering the sensor #11

Closed mporcheron closed 6 years ago

mporcheron commented 6 years ago

This PR adds a delayOff option, set to 0 by default, to delay the occupancy sensor being 'untriggered' when playback is stopped. The timeout is cancelled if another play event occurs before the untriggering occurs.

mporcheron commented 6 years ago

I've done that (with a typo in the commit message, ah well).

mporcheron commented 6 years ago

Serves me right for throwing this together without thinking it through. Moved it into the per-sensor config. I think this should do it — I've some some testing, but only with a single sensor. If I get more time, I'll test with multiple sensors.

I'd hold off merging just yet.

mporcheron commented 6 years ago

Sorry for not getting to testing it — it was on my (ever growing) to-do list. Glad it works, thanks for making this plugin in the first place!