Skip to content

Commit

Permalink
fix variable error
Browse files Browse the repository at this point in the history
  • Loading branch information
firstof9 committed Nov 1, 2022
1 parent e7d209a commit 787c31b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions openevsehttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,10 @@ async def toggle_override(self) -> None:

_LOGGER.debug("Detected firmware: %s", current)

if "dev" in value:
if "dev" in current:
_LOGGER.debug("Stripping 'dev' from version.")
value = value.split(".")
value = ".".join(value[0:3])
current = current.split(".")
current = ".".join(current[0:3])

if current >= cutoff:
url = f"{self.url}override"
Expand Down Expand Up @@ -549,10 +549,10 @@ async def firmware_check(self) -> dict | None:
cutoff = AwesomeVersion("4.0.0")
current = AwesomeVersion(self._config["version"])

if "dev" in value:
if "dev" in current:
_LOGGER.debug("Stripping 'dev' from version.")
value = value.split(".")
value = ".".join(value[0:3])
current = current.split(".")
current = ".".join(current[0:3])

if current >= cutoff:
url = f"{base_url}ESP32_WiFi_V4.x/releases/latest"
Expand Down

0 comments on commit 787c31b

Please sign in to comment.