Closed mkmer closed 2 months ago
It looks like the tests are expecting HTML for this part:
https://github.com/Kane610/aiounifi/blob/5452ff3eee2279d1ed988abb396e8493802da120/tests/test_controller.py#L41
Not sure if it's a "bad" test, real world testing with my controller makes it through the startup and eventually connects.
I read that wrong :) Sending html not receiving :)
Sorry about all of the "noise" - this should be the "final answer" - original tests still pass, new test covers the new code AND it actually fixes the startup problem :)
Sorry about all of the "noise" - this should be the "final answer" - original tests still pass, new test covers the new code AND it actually fixes the startup problem :)
Awesome! Don't worry about it. I looked through it but will review tonight
Thanks
Have you validated that this works in reality?
Yes, I tested with my configuration. As long as the host is returning "starting" with text/html the old code failed, this code triggers HA to retry the integration until it returns the "correct" login info.
Great! Will put up a new release tonight
This handles the non JSON response and causes retries until the host is "alive" There may be a better way to handle things. I selected .debug for the log as it "spams" the log file with errors during a "normal" startup