python-openevse-http 0.1.82__tar.gz → 0.1.84__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python_openevse_http
3
- Version: 0.1.82
3
+ Version: 0.1.84
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Author: firstof9
@@ -378,7 +378,7 @@ class OpenEVSE:
378
378
 
379
379
  async def get_override(self) -> Union[Dict[str, str], Dict[str, Any]]:
380
380
  """Get the manual override status."""
381
- if not self._version_check("4.0.0"):
381
+ if not self._version_check("4.0.1"):
382
382
  _LOGGER.debug("Feature not supported for older firmware.")
383
383
  raise UnsupportedFeature
384
384
  url = f"{self.url}override"
@@ -397,7 +397,7 @@ class OpenEVSE:
397
397
  auto_release: bool = True,
398
398
  ) -> Any:
399
399
  """Set the manual override status."""
400
- if not self._version_check("4.0.0"):
400
+ if not self._version_check("4.0.1"):
401
401
  _LOGGER.debug("Feature not supported for older firmware.")
402
402
  raise UnsupportedFeature
403
403
  url = f"{self.url}override"
@@ -432,7 +432,7 @@ class OpenEVSE:
432
432
  """Toggle the manual override status."""
433
433
  # 3.x: use RAPI commands $FE (enable) and $FS (sleep)
434
434
  # 4.x: use HTTP API call
435
- lower = "4.0.0"
435
+ lower = "4.0.1"
436
436
  msg = ""
437
437
  if self._version_check(lower):
438
438
  url = f"{self.url}override"
@@ -449,7 +449,7 @@ class OpenEVSE:
449
449
 
450
450
  async def clear_override(self) -> None:
451
451
  """Clear the manual override status."""
452
- if not self._version_check("4.0.0"):
452
+ if not self._version_check("4.0.1"):
453
453
  _LOGGER.debug("Feature not supported for older firmware.")
454
454
  raise UnsupportedFeature
455
455
  url = f"{self.url}override"
@@ -876,19 +876,16 @@ class OpenEVSE:
876
876
  async def set_divert_mode(self, mode: str = "fast") -> None:
877
877
  """Set the divert mode."""
878
878
  url = f"{self.url}divertmode"
879
-
880
879
  if mode not in ["fast", "eco"]:
881
- _LOGGER.error("Invalid value for charge_mode: %s", mode)
880
+ _LOGGER.error("Invalid value for divert mode: %s", mode)
882
881
  raise ValueError
883
-
884
882
  _LOGGER.debug("Setting divert mode to %s", mode)
885
-
886
883
  # convert text to int
887
884
  new_mode = divert_mode[mode]
888
- data = "divertmode=" + str(new_mode)
889
- response = await self.process_request(
890
- url=url, method="post", data=data
891
- ) # noqa: E501
885
+
886
+ data = f"divertmode={new_mode}"
887
+
888
+ response = await self.process_request(url=url, method="post", rapi=data)
892
889
  if response != "Divert Mode changed":
893
890
  _LOGGER.error("Problem issuing command: %s", response)
894
891
  raise UnknownError
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-openevse-http
3
- Version: 0.1.82
3
+ Version: 0.1.84
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Author: firstof9
@@ -6,7 +6,7 @@ from setuptools import find_packages, setup
6
6
 
7
7
  PROJECT_DIR = Path(__file__).parent.resolve()
8
8
  README_FILE = PROJECT_DIR / "README.md"
9
- VERSION = "0.1.82"
9
+ VERSION = "0.1.84"
10
10
 
11
11
  setup(
12
12
  name="python_openevse_http",