-
Notifications
You must be signed in to change notification settings - Fork 69
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
Don't need to login and handshake every time? #12
Comments
Yes I know that it doesn't need to login every time but through ha I can't see any way to only do it every set amount of time and I don't think anyone knows how long the cookies last for. |
Hmm, well I'll leave those bits commented out and see how long it is before it breaks. |
That would be a good test :) On another thought update has to be called quite often to update the state of the bulb/plug when its changed outside of the app so leaving it in update should be fine. |
It took 5 days after restarting HA and a handshake was required as the switch stopped responding. Had to reboot again to login |
I don't know how long the cookies last, but certainly we don't need to do the handshake and login every time the bulb is turned on or off or the brightness is set.
I've commented out those lines for now in the turn_on function and it means I get much quicker response times (sub half second, rather than a second or two).
They are still called (and so the cookie is refreshed) in the setup_platform, init and update functions, but I'm not sure how often those happen.
The text was updated successfully, but these errors were encountered: