Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions openevsehttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,47 @@ def ota_update(self) -> str:
assert self._status is not None
return self._status["ota_update"]

@property
def manual_override(self) -> str:
"""Return if Manual Override is set."""
assert self._status is not None
return self._status["manual_override"]

@property
def divertmode(self) -> str:
"""Return the divert mode."""
assert self._status is not None
mode = self._status["divertmode"]
if mode == 1:
return "normal"
else:
return "eco"

@property
def available_current(self) -> float:
"""Return the computed available current for divert."""
assert self._status is not None
return self._status["available_current"]

@property
def smoothed_available_current(self) -> float:
"""Return the computed smoothed available current for divert."""
assert self._status is not None
return self._status["smoothed_available_current"]

@property
def charge_rate(self) -> float:
"""Return the divert charge rate."""
assert self._status is not None
return self._status["charge_rate"]

@property
def divert_active(self) -> bool:
"""Return if divert is active"""
assert self._status is not None
return self._status["divert_active"]


# There is currently no min/max amps JSON data
# available via HTTP API methods
@property
Expand Down