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

Handle login non JSON response #640

Merged
merged 9 commits into from
Apr 18, 2024
Merged

Conversation

mkmer
Copy link
Contributor

@mkmer mkmer commented Apr 17, 2024

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

@mkmer
Copy link
Contributor Author

mkmer commented Apr 17, 2024

It looks like the tests are expecting HTML for this part:

content_type="text/html",

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 :)

@mkmer
Copy link
Contributor Author

mkmer commented Apr 17, 2024

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 :)

@Kane610
Copy link
Owner

Kane610 commented Apr 17, 2024

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

@Kane610
Copy link
Owner

Kane610 commented Apr 17, 2024

Thanks

@Kane610
Copy link
Owner

Kane610 commented Apr 17, 2024

Have you validated that this works in reality?

@mkmer
Copy link
Contributor Author

mkmer commented Apr 17, 2024

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.

@Kane610
Copy link
Owner

Kane610 commented Apr 18, 2024

Great! Will put up a new release tonight

@Kane610 Kane610 merged commit 8afb578 into Kane610:master Apr 18, 2024
1 check passed
@mkmer mkmer deleted the handle-login-text branch April 18, 2024 11:39
@Kane610 Kane610 mentioned this pull request Apr 23, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants