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

Use car distance units & remove solar type from model #288

Merged
merged 1 commit into from
Oct 22, 2022

Conversation

shred86
Copy link
Collaborator

@shred86 shred86 commented Oct 22, 2022

Fixes #284

Changes

  • Checking the vehicles gui_distance_units to determine whether to display miles vs kilometers instead of the user's Unit System setting in Home Assistant.
  • Remove solar_type from model. The Tesla API recently changed where solar_type is no longer included in the PRODUCT_LIST endpoint.

@alandtse
Copy link
Owner

Ugh, just saw this with the nonstandard commits. I'll revert and fix.

@jaymunro
Copy link

solar_type is still present, but it is not at the top level, but under components. See my comment in #354 of teslajsonpy.

Hence shouldn't the change be the following?

-        model = f"{self._energysite.resource_type.title()} {self._energysite.solar_type.replace('_', ' ')}"
+        model = f"{self._energysite.resource_type.title()} {self._energysite.components.solar_type.replace('_', ' ')}""

I realise this has already been merged but I have never done a PR and don't know if I have the perms to start one.

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.

No longer shows in Miles only km
3 participants