powervaultpy 1.0.3__tar.gz → 1.1.0__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
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: powervaultpy
3
- Version: 1.0.3
3
+ Version: 1.1.0
4
4
  Summary: An integration to control the Powervault battery
5
5
  Author-email: Adam McDonagh <adam@elitemonkey.net>
6
6
  License: GPLv3
@@ -23,3 +23,4 @@ Requires-Dist: pytest-env; extra == "dev"
23
23
  Requires-Dist: pytest-asyncio; extra == "dev"
24
24
  Requires-Dist: bumpver; extra == "dev"
25
25
  Requires-Dist: pre-commit; extra == "dev"
26
+ Requires-Dist: python-dotenv; extra == "dev"
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "powervaultpy"
7
- version = "1.0.3"
7
+ version = "1.1.0"
8
8
  authors = [
9
9
  { name="Adam McDonagh", email="adam@elitemonkey.net" },
10
10
  ]
@@ -31,7 +31,8 @@ dev = [
31
31
  "pytest-env",
32
32
  "pytest-asyncio",
33
33
  "bumpver",
34
- "pre-commit"
34
+ "pre-commit",
35
+ "python-dotenv",
35
36
  ]
36
37
 
37
38
  [project.urls]
@@ -43,7 +44,7 @@ dev = [
43
44
  profile = 'black'
44
45
 
45
46
  [tool.bumpver]
46
- current_version = "1.0.3"
47
+ current_version = "1.1.0"
47
48
  version_pattern = "MAJOR.MINOR.PATCH"
48
49
  commit_message = "bump version {old_version} -> {new_version}"
49
50
  commit = true
@@ -50,8 +50,7 @@ class PowerVault:
50
50
  ) -> None:
51
51
  """API Client."""
52
52
  self._api_key = api_key
53
- self._base_url = "http://rest-api-v2.powervault.co.uk"
54
- self._base_url_state = "https://api.p3.powervault.co.uk/v3"
53
+ self._base_url = "https://rest-api.powervault.co.uk/v4"
55
54
  self._session = session or requests.Session()
56
55
 
57
56
  self._session.headers.update(
@@ -178,7 +177,7 @@ class PowerVault:
178
177
 
179
178
  def set_battery_state(self, unit_id: str, battery_state) -> bool:
180
179
  """Override the current battery status with the provided one."""
181
- url = f"{self._base_url_state}/unit/{unit_id}/stateOverride"
180
+ url = f"{self._base_url}/unit/{unit_id}/stateOverride"
182
181
 
183
182
  start_time = datetime.now(pytz.timezone('UTC')).strftime("%Y-%m-%d %H:%M:%S")
184
183
  end_time = (datetime.now(pytz.timezone('UTC')) + timedelta(hours=24)).strftime("%Y-%m-%d %H:%M:%S")
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: powervaultpy
3
- Version: 1.0.3
3
+ Version: 1.1.0
4
4
  Summary: An integration to control the Powervault battery
5
5
  Author-email: Adam McDonagh <adam@elitemonkey.net>
6
6
  License: GPLv3
@@ -23,3 +23,4 @@ Requires-Dist: pytest-env; extra == "dev"
23
23
  Requires-Dist: pytest-asyncio; extra == "dev"
24
24
  Requires-Dist: bumpver; extra == "dev"
25
25
  Requires-Dist: pre-commit; extra == "dev"
26
+ Requires-Dist: python-dotenv; extra == "dev"
@@ -9,3 +9,4 @@ pytest-env
9
9
  pytest-asyncio
10
10
  bumpver
11
11
  pre-commit
12
+ python-dotenv
File without changes