doudz / zigate

python lib for zigate
MIT License
47 stars 22 forks source link

Error when clicking a lot on xiaomi switch button #185

Open greg95000 opened 4 years ago

greg95000 commented 4 years ago

When I click on my xiaomi switch button to trigger an action If I'm too fast I get this error in my logs "Fast change detected, delay it for ...". When it happen there is no return to a normal state.

I found the lines to change.

https://github.com/doudz/zigate/blob/master/zigate/core.py#L2980

I tried to remove the condition and it works. Why do we use it? Can we remove it properly? I think the code is making some infinite loop on this condition with multiple thread and the state is never going back to the normal

doudz commented 4 years ago

Fast change detection is buggy, it's safe to disable it