-
Notifications
You must be signed in to change notification settings - Fork 42
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
Validiate responses #68
Conversation
015d082
to
8bd3d11
Compare
e492bb8
to
529ae2b
Compare
As requested in home-assistant/core#44709 (comment), here's the output on an account with a robot that has a bad response (note I added a
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, tested in HA dev branch
Thanks @ahknight. The behavior is as intended. First we try to fetch the robot state. As we can see, the invalid response was logged. Then we try to use this state. Since it' s invalid, we log that too that and skip that robot. The other one works as expected and remains usable. |
@stianaske |
There have been some errors recently that indicate that neatos API is not behaving according to their documentation. For this reason, we are now validating all responses. This is not disruptive for now, as all errors in
robot.py
are logged and then ignored. Only errors that occur inaccount.py
will stop the further process as it makes no sense to continue with invalid data.Relevant issues:
Closes: #18
Still a draft, as extensive testing is requiredI think we can merge this. At least to solve the issues listed above as soon as possible. @dshokouhi What do you think?