python-homewizard-energy 9.1.1__tar.gz → 9.3.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.
Files changed (16) hide show
  1. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/PKG-INFO +1 -1
  2. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/models.py +21 -1
  3. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/pyproject.toml +9 -9
  4. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/LICENSE +0 -0
  5. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/README.md +0 -0
  6. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/__init__.py +0 -0
  7. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/const.py +0 -0
  8. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/errors.py +0 -0
  9. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/homewizard_energy.py +0 -0
  10. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/py.typed +0 -0
  11. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/utils.py +0 -0
  12. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/v1/__init__.py +0 -0
  13. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/v1/const.py +0 -0
  14. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/v2/__init__.py +0 -0
  15. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.0}/homewizard_energy/v2/cacert.py +0 -0
  16. {python_homewizard_energy-9.1.1 → python_homewizard_energy-9.3.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.1.1
3
+ Version: 9.3.0
4
4
  Summary: Asynchronous Python client for the HomeWizard Energy
5
5
  License: Apache-2.0
6
6
  Author: DCSBL
@@ -141,6 +141,20 @@ class Device(BaseModel):
141
141
  """Return if the device supports state."""
142
142
  return self.product_type == Model.ENERGY_SOCKET
143
143
 
144
+ def supports_led_brightness(self) -> bool:
145
+ """Return if the device supports LED brightness control."""
146
+ if self.product_type in (
147
+ Model.BATTERY,
148
+ Model.ENERGY_SOCKET,
149
+ ):
150
+ return True
151
+
152
+ # P1 Meter supports LED brightness from API v2.0.0 onwards
153
+ if self.product_type == Model.P1_METER:
154
+ return self.api_version.major >= 2
155
+
156
+ return False
157
+
144
158
  def supports_cloud_enable(self) -> bool:
145
159
  """Return if the device supports cloud enable/disable."""
146
160
  return self.product_type != Model.BATTERY
@@ -164,7 +178,13 @@ class Device(BaseModel):
164
178
 
165
179
  def supports_batteries(self) -> bool:
166
180
  """Return if the device supports batteries."""
167
- return self.product_type == Model.P1_METER
181
+ return self.product_type in (
182
+ Model.P1_METER,
183
+ Model.ENERGY_METER_1_PHASE,
184
+ Model.ENERGY_METER_3_PHASE,
185
+ Model.ENERGY_METER_EASTRON_SDM230,
186
+ Model.ENERGY_METER_EASTRON_SDM630,
187
+ )
168
188
 
169
189
 
170
190
  @dataclass(kw_only=True)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "python-homewizard-energy"
3
- version = "9.1.1"
3
+ version = "9.3.0"
4
4
  description = "Asynchronous Python client for the HomeWizard Energy"
5
5
  authors = ["DCSBL"]
6
6
  maintainers = ["DCSBL"]
@@ -33,12 +33,12 @@ isort = "^6.0.1"
33
33
  pre-commit = "^4.2.0"
34
34
  pre-commit-hooks = "^5.0.0"
35
35
  pylint = "^3.3.7"
36
- pytest = "^8.3.5"
37
- pytest-asyncio = "^0.26.0"
38
- pytest-cov = "^6.1.1"
36
+ pytest = "^8.4.1"
37
+ pytest-asyncio = "^1.1.0"
38
+ pytest-cov = "^6.2.1"
39
39
  yamllint = "^1.37.1"
40
- pyupgrade = "^3.19.0"
41
- flake8-simplify = "^0.21.0"
40
+ pyupgrade = "^3.20.0"
41
+ flake8-simplify = "^0.22.0"
42
42
  vulture = "^2.13"
43
43
  flake8-bandit = "^3.0.0"
44
44
  flake8-bugbear = "^23.3.12"
@@ -46,11 +46,11 @@ flake8-builtins = "^2.5.0"
46
46
  flake8-comprehensions = "^3.15.0"
47
47
  flake8-eradicate = "^1.2.1"
48
48
  flake8-markdown = "^0.3.0"
49
- ruff = "0.11.7"
49
+ ruff = "0.12.7"
50
50
  darglint = "^1.8.1"
51
- safety = "^3.2.10"
51
+ safety = "^3.6.0"
52
52
  codespell = "^2.4.1"
53
- bandit = "^1.8.3"
53
+ bandit = "^1.8.6"
54
54
  syrupy = "^4.9.1"
55
55
 
56
56
  [tool.poetry.urls]