python-homewizard-energy 3.1.0__tar.gz → 4.0.0b1__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-homewizard-energy
3
- Version: 3.1.0
3
+ Version: 4.0.0b1
4
4
  Summary: Asynchronous Python client for the HomeWizard Energy
5
5
  Home-page: https://github.com/dcsbl/python-homewizard-energy
6
6
  License: Apache-2.0
@@ -12,8 +12,8 @@ Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.9
13
13
  Classifier: Programming Language :: Python :: 3.10
14
14
  Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
15
16
  Requires-Dist: aiohttp (>=3.0.0)
16
- Requires-Dist: awesomeversion (>=22.9.0)
17
17
  Project-URL: Bug Tracker, https://github.com/dcsbl/python-homewizard-energy/issues
18
18
  Project-URL: Changelog, https://github.com/dcsbl/python-homewizard-energy/releases
19
19
  Project-URL: Documentation, https://github.com/dcsbl/python-homewizard-energy
@@ -25,10 +25,6 @@ Description-Content-Type: text/markdown
25
25
  Asyncio package to communicate with HomeWizard Energy devices
26
26
  This package is aimed at basic control of the device. Initial setup and configuration is assumed to done with the official HomeWizard Energy app.
27
27
 
28
- ## Disclaimer
29
-
30
- This package is not developed, nor supported by HomeWizard.
31
-
32
28
  ## Installation
33
29
  ```bash
34
30
  python3 -m pip install python-homewizard-energy
@@ -40,22 +36,40 @@ Instantiate the HWEnergy class and access the API.
40
36
  For more details on the API see the official API documentation on
41
37
  https://homewizard-energy-api.readthedocs.io
42
38
 
43
- # Example
44
- The example below is available as a runnable script in the repository.
45
-
39
+ ## Example
46
40
  ```python
41
+ import asyncio
47
42
  from homewizard_energy import HomeWizardEnergy
48
43
 
49
44
  IP_ADDRESS = "192.168.1.123"
50
45
 
51
- # Make contact with an energy device
52
- async with HomeWizardEnergy(IP_ADDRESS) as api:
53
46
 
54
- # Use the data
47
+ async def main():
48
+
49
+ async with HomeWizardEnergy(host=IP_ADDRESS) as api
50
+
55
51
  print(await api.device())
56
52
  print(await api.data())
57
- print(await api.state())
58
53
 
59
54
  await api.state_set(power_on=True)
55
+
56
+
57
+ asyncio.run(main())
60
58
  ```
61
59
 
60
+ # Development and contribution
61
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
62
+
63
+ ## Requirements
64
+ - Python 3.9 or higher
65
+ - [Poetry](https://python-poetry.org/docs/#installing-with-pipx)
66
+
67
+ ## Installation and setup
68
+ ```bash
69
+ poetry install
70
+ poetry shell
71
+ pre-commit install
72
+ ```
73
+
74
+ You can now start developing. The pre-commit hooks will run automatically when you commit your changes. Please note that a failed pre-commit hook will prevent you from committing your changes. This is to make sure that the code is formatted correctly and that the tests pass.
75
+
@@ -0,0 +1,52 @@
1
+ # python-homewizard-energy
2
+
3
+ Asyncio package to communicate with HomeWizard Energy devices
4
+ This package is aimed at basic control of the device. Initial setup and configuration is assumed to done with the official HomeWizard Energy app.
5
+
6
+ ## Installation
7
+ ```bash
8
+ python3 -m pip install python-homewizard-energy
9
+ ```
10
+
11
+ # Usage
12
+ Instantiate the HWEnergy class and access the API.
13
+
14
+ For more details on the API see the official API documentation on
15
+ https://homewizard-energy-api.readthedocs.io
16
+
17
+ ## Example
18
+ ```python
19
+ import asyncio
20
+ from homewizard_energy import HomeWizardEnergy
21
+
22
+ IP_ADDRESS = "192.168.1.123"
23
+
24
+
25
+ async def main():
26
+
27
+ async with HomeWizardEnergy(host=IP_ADDRESS) as api
28
+
29
+ print(await api.device())
30
+ print(await api.data())
31
+
32
+ await api.state_set(power_on=True)
33
+
34
+
35
+ asyncio.run(main())
36
+ ```
37
+
38
+ # Development and contribution
39
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
40
+
41
+ ## Requirements
42
+ - Python 3.9 or higher
43
+ - [Poetry](https://python-poetry.org/docs/#installing-with-pipx)
44
+
45
+ ## Installation and setup
46
+ ```bash
47
+ poetry install
48
+ poetry shell
49
+ pre-commit install
50
+ ```
51
+
52
+ You can now start developing. The pre-commit hooks will run automatically when you commit your changes. Please note that a failed pre-commit hook will prevent you from committing your changes. This is to make sure that the code is formatted correctly and that the tests pass.
@@ -6,11 +6,3 @@ SUPPORTS_STATE = ["HWE-SKT"]
6
6
  SUPPORTS_IDENTIFY = ["HWE-SKT", "HWE-P1"]
7
7
  SUPPORTS_SYSTEM = ["HWE-SKT", "HWE-P1", "SDM230-WIFI", "SDM630-WIFI"]
8
8
  SUPPORTS_DECRYPTION = ["HWE-P1"]
9
-
10
- LATEST_STABLE_FIRMWARE = {
11
- "HWE-P1": "4.18",
12
- "HWE-SKT": "3.03",
13
- "HWE-WTR": "2.03",
14
- "SDM230-WIFI": "3.06",
15
- "SDM630-WIFI": "3.06",
16
- }
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-homewizard-energy"
3
- version = "3.1.0"
3
+ version = "4.0.0-beta-1"
4
4
  description = "Asynchronous Python client for the HomeWizard Energy"
5
5
  authors = ["DCSBL"]
6
6
  maintainers = ["DCSBL"]
@@ -18,7 +18,6 @@ packages = [
18
18
  [tool.poetry.dependencies]
19
19
  python = "^3.9"
20
20
  aiohttp = ">=3.0.0"
21
- awesomeversion = ">=22.9.0"
22
21
 
23
22
  [tool.poetry.dev-dependencies]
24
23
  aresponses = "^2.1.6"
@@ -27,19 +26,19 @@ blacken-docs = "^1.16.0"
27
26
  flake8 = "^4.0.1"
28
27
  flake8-docstrings = "^1.7.0"
29
28
  isort = "^5.12.0"
30
- pre-commit = "^3.4.0"
29
+ pre-commit = "^3.5.0"
31
30
  pre-commit-hooks = "^4.5.0"
32
- pylint = "^3.0.1"
33
- pytest = "^7.4.2"
34
- pytest-asyncio = "^0.20.3"
31
+ pylint = "^3.0.2"
32
+ pytest = "^7.4.3"
33
+ pytest-asyncio = "^0.21.1"
35
34
  pytest-cov = "^4.1.0"
36
- yamllint = "^1.32.0"
35
+ yamllint = "^1.33.0"
37
36
  pyupgrade = "^3.15.0"
38
37
  flake8-simplify = "^0.21.0"
39
38
  vulture = "^2.10"
40
39
  flake8-bandit = "^3.0.0"
41
40
  flake8-bugbear = "^23.3.12"
42
- flake8-builtins = "^2.1.0"
41
+ flake8-builtins = "^2.2.0"
43
42
  flake8-comprehensions = "^3.14.0"
44
43
  flake8-eradicate = "^1.2.1"
45
44
  flake8-markdown = "^0.3.0"
@@ -47,6 +46,7 @@ darglint = "^1.8.1"
47
46
  safety = "^2.3.5"
48
47
  codespell = "^2.2.6"
49
48
  bandit = "^1.7.5"
49
+ syrupy = "^4.6.0"
50
50
 
51
51
  [tool.poetry.urls]
52
52
  "Bug Tracker" = "https://github.com/dcsbl/python-homewizard-energy/issues"
@@ -1,38 +0,0 @@
1
- # python-homewizard-energy
2
-
3
- Asyncio package to communicate with HomeWizard Energy devices
4
- This package is aimed at basic control of the device. Initial setup and configuration is assumed to done with the official HomeWizard Energy app.
5
-
6
- ## Disclaimer
7
-
8
- This package is not developed, nor supported by HomeWizard.
9
-
10
- ## Installation
11
- ```bash
12
- python3 -m pip install python-homewizard-energy
13
- ```
14
-
15
- # Usage
16
- Instantiate the HWEnergy class and access the API.
17
-
18
- For more details on the API see the official API documentation on
19
- https://homewizard-energy-api.readthedocs.io
20
-
21
- # Example
22
- The example below is available as a runnable script in the repository.
23
-
24
- ```python
25
- from homewizard_energy import HomeWizardEnergy
26
-
27
- IP_ADDRESS = "192.168.1.123"
28
-
29
- # Make contact with an energy device
30
- async with HomeWizardEnergy(IP_ADDRESS) as api:
31
-
32
- # Use the data
33
- print(await api.device())
34
- print(await api.data())
35
- print(await api.state())
36
-
37
- await api.state_set(power_on=True)
38
- ```