homebridge-magic-occupancy icon indicating copy to clipboard operation
homebridge-magic-occupancy copied to clipboard

Feature Request - Different TimeOut settings

Open darrenmcuk opened this issue 2 years ago • 3 comments

Would it be possible to extend the plugin to permit different occupancy timeouts depending on the time of day.

Example….in the bathroom during the day 10 mins…during the dead of night 3 mins?

Thanks

Darren

darrenmcuk avatar Apr 14 '22 17:04 darrenmcuk

Hey there, It's theoretically possible but I think it could be pretty complex to make it configurable in a nice and clean way.

How about creating multiple occupancy sensors and making the links between each occupancy sensor and your accessory only apply for certain parts of the day? (Ex. A daytime and nighttime occupancy sensor each with the same switches linked to the same triggers but with their output automations set for different hours.). Would this perhaps work?

Jason-Morcos avatar Apr 16 '22 19:04 Jason-Morcos

Something similar that could be cool is changing the timeout based on how often motion is detected in a single occupation. So for example, in my home office, the timeout is 2 minutes. However, it would be cool if there was away to create a changing time out based on how long its been occupied or how many motion triggers are hit.

  1. Motion is triggered, minimum timer set, 2 minutes for example
  2. Motion is triggered while still occupied, increase time out by by 10%
  3. Repeat until a maximum is hit, say 5 minutes.

I'm not much of a javascript guy, but I might try and fiddle with it myself and submit a PR if it works.

trickster-is-weak avatar Nov 27 '22 13:11 trickster-is-weak

That could be really useful…Dining Rooms etc….

darrenmcuk avatar Nov 27 '22 13:11 darrenmcuk