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