Skip to content

Commit b632f1e

Browse files
authored
fix: if max_current_soft doesn't exist return the pilot value
2 parents 62836a4 + 08a6800 commit b632f1e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

openevsehttp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ def max_current_soft(self) -> int | None:
688688
"""Return the firmware version."""
689689
if self._config is not None and "max_current_soft" in self._config:
690690
return self._config["max_current_soft"]
691-
return None
691+
return self._status["pilot"]
692692

693693
@property
694694
def wifi_firmware(self) -> str:

tests/test_init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ async def test_vehicle_eta(fixture, expected, request):
903903

904904

905905
@pytest.mark.parametrize(
906-
"fixture, expected", [("test_charger", 48), ("test_charger_v2", None)]
906+
"fixture, expected", [("test_charger", 48), ("test_charger_v2", 25)]
907907
)
908908
async def test_max_current_soft(fixture, expected, request):
909909
"""Test max_current_soft reply."""

0 commit comments

Comments
 (0)