hbblebc / homebridge-bed-control

Homebridge plugin to control compatible smart beds
Apache License 2.0
7 stars 1 forks source link

Debounce setSleepNumber per side, not globally. #4

Closed traviswparker closed 1 year ago

traviswparker commented 1 year ago

Is your feature request related to a problem? Please describe:

If a scene/automation sends commands to set both sides of the bed, only one side will be set. Debouncing eats one of the commands. Watching debug logs verifies both requests come in to set sleep number, but only one snapi request is generated. This is because debounce is around the general setSleepNumber call vs a per-side call.

Describe the solution you'd like: debounce could be on each sleep number characteristic's set function.

Describe alternatives you've considered: Send delay can be set to 0 as a workaround but that disables debounce during adjust.

Additional context:

hbblebc commented 1 year ago

Let me know if the updates get this working for you.

traviswparker commented 1 year ago

Yep. Everything seems to be working perfectly. Automations are working reliably too.