Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When an app external to WizLib changes the state of a bulb, the cached bulb state in WizLib is incorrect. #4

Open
PonchoPowers opened this issue May 14, 2022 · 0 comments

Comments

@PonchoPowers
Copy link

One of the bugs I was trying to figure out was why the WizLib library reports an incorrect colour state sometimes, then I realised that if the colour of a bulb is changed by some other software, the WizLib library doesn't know about this and returns what it has cached about the bulb.

This effectively makes the cache return wrong information.

I'm not convinced that you need to cache the bulb state and I'm of the opinion that the caching should be removed in entirety, therefore simplifying the code and removing the need for locks. The bulb itself will then be the single source of truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant