-
Notifications
You must be signed in to change notification settings - Fork 82
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
feat: India region support #499
base: master
Are you sure you want to change the base?
Conversation
Thanks for doing this! I'll run through feedback this weekend. Are you able to cleanup merge conflicts and potentially rebase? It shows a lot of changes that may not be real. It will help with review. Version commit also needs to be backed out. The system does that. |
india.py
Outdated
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.
This should either:
- Removed.
- Moved to the test folders and we load your creds into a secret in the repo so these tests are run like EU. No pressure though.
@@ -45,7 +57,15 @@ class DayTripInfo: | |||
"""Day Trip Info""" | |||
|
|||
yyyymmdd: str = None | |||
summary: TripInfo = None |
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.
Be removing this it will break other regions. I also think adding the below will break other regions. Can we conform to existing?
@@ -11,16 +12,27 @@ | |||
_LOGGER = logging.getLogger(__name__) | |||
|
|||
|
|||
@dataclass |
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.
Location is already handled and used in other values. No need for a new class.
@@ -1,5 +1,6 @@ | |||
# pylint:disable=missing-class-docstring,missing-function-docstring,wildcard-import,unused-wildcard-import,invalid-name | |||
"""Vehicle class""" | |||
import decimal |
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.
We use floats.
@dataclass | ||
class TripInfo: | ||
"""Trip Info""" | ||
|
||
hhmmss: str = None # will not be filled by summary |
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.
Removing fields will break other regions and not work for kia_uvo. Please try to use the existing fields if possible.
self._update_vehicle_properties(vehicle, state) | ||
state = self._get_maintenance_alert(token, vehicle) | ||
self._update_vehicle_maintenance_alert(vehicle, state) | ||
state = self._get_location(token, vehicle) |
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.
This needs protective logic. By doing this in a cached call you will kill the vehicle battery. Cached calls shouldn't hit the car each call.
|
||
def force_refresh_vehicle_state(self, token: Token, vehicle: Vehicle) -> None: | ||
# FIXME: Gowtham - No force refresh | ||
_LOGGER.error(f"Disabling force refresh") |
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.
Add domain like other logging to clarify what is throwing this. I assume this exists since force refresh command doesn't work yet?
any updates on this? |
Hi @gowthamgowtham any update? |
any updates |
@gowthamgowtham any update? |
Works for India region. I haven't managed to add new tests. I am sure some cleanup will be necessary.