Skip to content

Commit

Permalink
fix: fix Energy Left (#465)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkwok1 committed Apr 4, 2024
1 parent 2c5e434 commit 1710481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teslajsonpy/energy.py
Expand Up @@ -149,7 +149,7 @@ def data_available(self) -> bool:
@property
def energy_left(self) -> float:
"""Return battery energy left in Watt hours."""
return self._site_summary.get("energy_left")
return round (self._site_config.get("nameplate_energy") * self.percentage_charged / 100 )

@property
def grid_power(self) -> float:
Expand Down

0 comments on commit 1710481

Please sign in to comment.