Homevolt 0.2.0__tar.gz → 0.2.1__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.4
2
2
  Name: Homevolt
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Python library for Homevolt EMS devices
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  License: GPL-3.0
@@ -33,7 +33,7 @@ Control your battery with:
33
33
  ## Install
34
34
 
35
35
  ```bash
36
- pip install pyHomevolt
36
+ pip install homevolt
37
37
  ```
38
38
 
39
39
  ## Example
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Homevolt
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Python library for Homevolt EMS devices
5
5
  Author-email: Your Name <your.email@example.com>
6
6
  License: GPL-3.0
@@ -33,7 +33,7 @@ Control your battery with:
33
33
  ## Install
34
34
 
35
35
  ```bash
36
- pip install pyHomevolt
36
+ pip install homevolt
37
37
  ```
38
38
 
39
39
  ## Example
@@ -17,7 +17,7 @@ Control your battery with:
17
17
  ## Install
18
18
 
19
19
  ```bash
20
- pip install pyHomevolt
20
+ pip install homevolt
21
21
  ```
22
22
 
23
23
  ## Example
@@ -41,7 +41,7 @@ class Device:
41
41
  password: Optional password for authentication
42
42
  websession: aiohttp ClientSession for making requests
43
43
  """
44
- self._ip_address = ip_address
44
+ self.ip_address = ip_address
45
45
  self._password = password
46
46
  self._websession = websession
47
47
  self._auth = aiohttp.BasicAuth("admin", password) if password else None
@@ -59,7 +59,7 @@ class Device:
59
59
  async def fetch_ems_data(self) -> None:
60
60
  """Fetch EMS data from the device."""
61
61
  try:
62
- url = f"http://{self._ip_address}{ENDPOINT_EMS}"
62
+ url = f"http://{self.ip_address}{ENDPOINT_EMS}"
63
63
  async with self._websession.get(url, auth=self._auth) as response:
64
64
  if response.status == 401:
65
65
  raise HomevoltAuthenticationError("Authentication failed")
@@ -75,7 +75,7 @@ class Device:
75
75
  async def fetch_schedule_data(self) -> None:
76
76
  """Fetch schedule data from the device."""
77
77
  try:
78
- url = f"http://{self._ip_address}{ENDPOINT_SCHEDULE}"
78
+ url = f"http://{self.ip_address}{ENDPOINT_SCHEDULE}"
79
79
  async with self._websession.get(url, auth=self._auth) as response:
80
80
  if response.status == 401:
81
81
  raise HomevoltAuthenticationError("Authentication failed")
@@ -381,7 +381,7 @@ class Device:
381
381
  HomevoltDataError: If response parsing fails
382
382
  """
383
383
  try:
384
- url = f"http://{self._ip_address}{ENDPOINT_CONSOLE}"
384
+ url = f"http://{self.ip_address}{ENDPOINT_CONSOLE}"
385
385
  async with self._websession.post(
386
386
  url,
387
387
  auth=self._auth,
@@ -589,7 +589,7 @@ class Device:
589
589
  HomevoltDataError: If parameter setting fails
590
590
  """
591
591
  try:
592
- url = f"http://{self._ip_address}{ENDPOINT_PARAMS}"
592
+ url = f"http://{self.ip_address}{ENDPOINT_PARAMS}"
593
593
  async with self._websession.post(
594
594
  url,
595
595
  auth=self._auth,
@@ -619,7 +619,7 @@ class Device:
619
619
  HomevoltDataError: If parameter retrieval fails
620
620
  """
621
621
  try:
622
- url = f"http://{self._ip_address}{ENDPOINT_PARAMS}"
622
+ url = f"http://{self.ip_address}{ENDPOINT_PARAMS}"
623
623
  async with self._websession.get(url, auth=self._auth) as response:
624
624
  if response.status == 401:
625
625
  raise HomevoltAuthenticationError("Authentication failed")
@@ -27,7 +27,7 @@ class Homevolt:
27
27
  password: Optional password for authentication
28
28
  websession: Optional aiohttp ClientSession. If not provided, one will be created.
29
29
  """
30
- self._ip_address = ip_address
30
+ self.ip_address = ip_address
31
31
  self._password = password
32
32
  self._websession = websession
33
33
  self._own_session = websession is None
@@ -40,7 +40,7 @@ class Homevolt:
40
40
  await self._ensure_session()
41
41
  assert self._websession is not None
42
42
  self._device = Device(
43
- ip_address=self._ip_address,
43
+ ip_address=self.ip_address,
44
44
  password=self._password,
45
45
  websession=self._websession,
46
46
  )
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "Homevolt"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "Python library for Homevolt EMS devices"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
File without changes
File without changes
File without changes
File without changes