python-openevse-http 0.1.81__tar.gz → 0.1.83__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.81
3
+ Version: 0.1.83
4
4
  Summary: Python wrapper for OpenEVSE HTTP API
5
5
  Home-page: https://github.com/firstof9/python-openevse-http
6
6
  Author: firstof9
@@ -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": 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.81
3
+ Version: 0.1.83
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.81"
9
+ VERSION = "0.1.83"
10
10
 
11
11
  setup(
12
12
  name="python_openevse_http",