-
Notifications
You must be signed in to change notification settings - Fork 34
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
Rewrite to use models instead #126
Conversation
@DurgNomis-drol I hope you haven't been to ill. It indeed is a large change, but it shouldn't be a problem to review this. Please give me a few days, so I can do a decent review. Will come back to you soon! |
@joro75 Thanks, no hurry, I am still missing some minor things in this PR. I need to add docstrings and so on. Will try to get it done to night. Fortunately i'm not that ill from it |
A couple of things have been removed in this also. This now means that you can not get the vehicle status in json. If this is still something we want, we can implement it. But I don't think it is need. The structure of the objects have changed also to make more sense and i have also add a couple of new attributes and name things more appropriately. There are probably things that can be done better, this is just a "draft" to get us started. |
I was first confused by the different dictionary key names that are used, but I discovered that this seems to be correct. There are 2 suggestions:
|
Thanks for the feedback. Suggestion 1: Suggestion 2: The reason I have chosen to use We could introduce a default for
When looking into adding a function that tells you what features are supported, I realised, it is just easier to check if the parent object is |
Ok.
There are a few checks I still would like to do before approving the PR. Will come back later, after I checked it. |
Yes, open a separate issue so we can find a solution 😃 Again, thanks for reviewing and giving feedback |
See my PR #128. Do you want me to approve this PR (after you approved PR #128)? It will then of course become the actual 'master' code, causing code breaking changes. |
I just approved yours. And when you are ready, you can approve this, and then i will merge both in to master. I won't release a new version just yet, I want to do some code clean up and simplification (Or at least try to do that) but none of that should be a breaking change. I also believe we should find a solution to your version problem, so we don't break your integration before you have moved it, before releasing a new version. I won't immediately change my Home Assistant integration, because I am thinking rewriting it anyways. |
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.
Is certainly a large code changes, but it is actually a good change in my opinion, as it will simplify the using of the library. 👍👍
Sick with corona and I was extremely bored 😜 so I rewrote nearly all the data models. This should now fix a lot of problems, but this will also mean that this is a breaking change. Hopefully this makes it a lot easier in the future to manage this module.
@joro75 If you are up for the task, you are more then welcome to review it. But I do understand if you don't (as it is quite large) 😃
I also rewrote the tests to match the new structure