python-homewizard-energy 9.1.0b1__tar.gz → 9.2.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.
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/PKG-INFO +2 -2
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/models.py +12 -33
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/pyproject.toml +4 -4
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/LICENSE +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/README.md +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/__init__.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/const.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/errors.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/homewizard_energy.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/py.typed +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/utils.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v1/__init__.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v1/const.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v2/__init__.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v2/cacert.py +0 -0
- {python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v2/const.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: python-homewizard-energy
|
|
3
|
-
Version: 9.
|
|
3
|
+
Version: 9.2.0
|
|
4
4
|
Summary: Asynchronous Python client for the HomeWizard Energy
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: DCSBL
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
12
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
13
|
Requires-Dist: aiohttp (>=3.0.0)
|
|
14
14
|
Requires-Dist: async-timeout (>=4.0.3,<6.0.0)
|
|
15
|
-
Requires-Dist: awesomeversion (>=24.6.0
|
|
15
|
+
Requires-Dist: awesomeversion (>=24.6.0)
|
|
16
16
|
Requires-Dist: backoff (>=2.2.1,<3.0.0)
|
|
17
17
|
Requires-Dist: mashumaro (>=3.15,<4.0)
|
|
18
18
|
Requires-Dist: multidict (>=6.0.5,<7.0.0)
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/models.py
RENAMED
|
@@ -102,32 +102,6 @@ class CombinedModels:
|
|
|
102
102
|
self.system = System()
|
|
103
103
|
self.system.status_led_brightness_pct = (self.state.brightness / 255) * 100
|
|
104
104
|
|
|
105
|
-
if self.device.product_type != Model.P1_METER and self.measurement is not None:
|
|
106
|
-
# Remove duplicate 't1' tariff from non-tariff meters
|
|
107
|
-
if (
|
|
108
|
-
self.measurement.energy_import_kwh is not None
|
|
109
|
-
and self.measurement.energy_import_kwh
|
|
110
|
-
== self.measurement.energy_import_t1_kwh
|
|
111
|
-
):
|
|
112
|
-
self.measurement.energy_import_t1_kwh = None
|
|
113
|
-
if (
|
|
114
|
-
self.measurement.energy_export_kwh is not None
|
|
115
|
-
and self.measurement.energy_export_kwh
|
|
116
|
-
== self.measurement.energy_export_t1_kwh
|
|
117
|
-
):
|
|
118
|
-
self.measurement.energy_export_t1_kwh = None
|
|
119
|
-
|
|
120
|
-
# Remove duplicate 'power_l1' from 1-phase meters
|
|
121
|
-
# If l2 or l3 is present, keep 'power_l1'
|
|
122
|
-
if (
|
|
123
|
-
self.measurement.power_w is not None
|
|
124
|
-
and self.measurement.power_l2_w is None
|
|
125
|
-
and self.measurement.power_l3_w is None
|
|
126
|
-
and (self.measurement.power_w == self.measurement.power_l1_w)
|
|
127
|
-
):
|
|
128
|
-
# Remove duplicate 'power_l1_w' when it matches 'power_w' and l2 or l3 is present
|
|
129
|
-
self.measurement.power_l1_w = None
|
|
130
|
-
|
|
131
105
|
|
|
132
106
|
def get_verification_hostname(model: str, serial_number: str) -> str:
|
|
133
107
|
"""Helper method to convert device model and serial to identifier
|
|
@@ -190,7 +164,13 @@ class Device(BaseModel):
|
|
|
190
164
|
|
|
191
165
|
def supports_batteries(self) -> bool:
|
|
192
166
|
"""Return if the device supports batteries."""
|
|
193
|
-
return self.product_type
|
|
167
|
+
return self.product_type in (
|
|
168
|
+
Model.P1_METER,
|
|
169
|
+
Model.ENERGY_METER_1_PHASE,
|
|
170
|
+
Model.ENERGY_METER_3_PHASE,
|
|
171
|
+
Model.ENERGY_METER_EASTRON_SDM230,
|
|
172
|
+
Model.ENERGY_METER_EASTRON_SDM630,
|
|
173
|
+
)
|
|
194
174
|
|
|
195
175
|
|
|
196
176
|
@dataclass(kw_only=True)
|
|
@@ -628,16 +608,15 @@ class Batteries(BaseModel):
|
|
|
628
608
|
TO_FULL = "to_full"
|
|
629
609
|
STANDBY = "standby"
|
|
630
610
|
|
|
631
|
-
mode: Mode
|
|
632
|
-
default=None,
|
|
611
|
+
mode: Mode = field(
|
|
633
612
|
metadata={
|
|
634
613
|
"deserialize": lambda x: Batteries.Mode.__members__.get(x.upper(), None)
|
|
635
614
|
},
|
|
636
615
|
)
|
|
637
|
-
power_w: float
|
|
638
|
-
target_power_w: float
|
|
639
|
-
max_consumption_w: float
|
|
640
|
-
max_production_w: float
|
|
616
|
+
power_w: float = field()
|
|
617
|
+
target_power_w: float = field()
|
|
618
|
+
max_consumption_w: float = field()
|
|
619
|
+
max_production_w: float = field()
|
|
641
620
|
|
|
642
621
|
|
|
643
622
|
@dataclass(kw_only=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "python-homewizard-energy"
|
|
3
|
-
version = "9.
|
|
3
|
+
version = "9.2.0"
|
|
4
4
|
description = "Asynchronous Python client for the HomeWizard Energy"
|
|
5
5
|
authors = ["DCSBL"]
|
|
6
6
|
maintainers = ["DCSBL"]
|
|
@@ -23,7 +23,7 @@ multidict = "^6.0.5" ## To fix aiohttp dependency at python 3.12
|
|
|
23
23
|
backoff = "^2.2.1"
|
|
24
24
|
orjson = "^3.10"
|
|
25
25
|
mashumaro = "^3.15"
|
|
26
|
-
awesomeversion = "
|
|
26
|
+
awesomeversion = ">=24.6.0"
|
|
27
27
|
|
|
28
28
|
[tool.poetry.dev-dependencies]
|
|
29
29
|
aresponses = "^3.0.0"
|
|
@@ -32,11 +32,11 @@ flake8-docstrings = "^1.7.0"
|
|
|
32
32
|
isort = "^6.0.1"
|
|
33
33
|
pre-commit = "^4.2.0"
|
|
34
34
|
pre-commit-hooks = "^5.0.0"
|
|
35
|
-
pylint = "^3.3.
|
|
35
|
+
pylint = "^3.3.7"
|
|
36
36
|
pytest = "^8.3.5"
|
|
37
37
|
pytest-asyncio = "^0.26.0"
|
|
38
38
|
pytest-cov = "^6.1.1"
|
|
39
|
-
yamllint = "^1.37.
|
|
39
|
+
yamllint = "^1.37.1"
|
|
40
40
|
pyupgrade = "^3.19.0"
|
|
41
41
|
flake8-simplify = "^0.21.0"
|
|
42
42
|
vulture = "^2.13"
|
|
File without changes
|
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/__init__.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/const.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/py.typed
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/utils.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v1/__init__.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v1/const.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v2/__init__.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v2/cacert.py
RENAMED
|
File without changes
|
{python_homewizard_energy-9.1.0b1 → python_homewizard_energy-9.2.0}/homewizard_energy/v2/const.py
RENAMED
|
File without changes
|