balansse / homebridge-vivint

Integrates Vivint security system with Apple Home
Other
45 stars 15 forks source link

Plugin crashes when using debounce-promise for dimmer light control #57

Closed nathantsmith closed 2 years ago

nathantsmith commented 2 years ago

image Im finding that the next() callback is undefined in the brightness level set method. I dont know enough about javascript to fix it yet. hoping to get some help. if I bypass the debounce the method and set the brightness directly like the other characteristics everything works fine. (Besides the delayed responses that warranted the debounce in the first place).

Line number should be 85, but I had made some modifications. Hoping someone can help me figure out why we loose the context for next() during the debounced call.