python-bsblan 6.1.2__py3-none-any.whl → 6.1.4__py3-none-any.whl

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.
bsblan/_validation.py CHANGED
@@ -96,6 +96,9 @@ class SectionValidator:
96
96
  dict[str, str]: Mapping of parameter id to parameter name.
97
97
 
98
98
  """
99
+ if not self._api_validator:
100
+ raise BSBLANError(ErrorMsg.API_VALIDATOR_NOT_INITIALIZED)
101
+
99
102
  return cast("APIValidator", self._api_validator).get_section_params(section)
100
103
 
101
104
  def apply_bus_specific_api_config(
bsblan/bsblan.py CHANGED
@@ -19,6 +19,7 @@ from ._version import VersionResolver
19
19
  from .constants import (
20
20
  API_BASIC,
21
21
  API_FULL,
22
+ MIN_SUPPORTED_JSON_API,
22
23
  APIConfig,
23
24
  CircuitConfig,
24
25
  ErrorMsg,
@@ -187,6 +188,13 @@ class BSBLAN:
187
188
  # circuits == [1, 2] for a dual-circuit controller
188
189
 
189
190
  """
191
+ if self._json_api_version == MIN_SUPPORTED_JSON_API:
192
+ logger.debug(
193
+ "BSBLAN JSON-API version 1.0 detected; skipping circuit discovery and "
194
+ "assuming only circuit 1 is available"
195
+ )
196
+ self._available_circuits = {1}
197
+ return [1]
190
198
  if self._uses_pps_bus:
191
199
  return await self._get_available_pps_circuits()
192
200
 
@@ -204,8 +212,9 @@ class BSBLAN:
204
212
  continue
205
213
 
206
214
  # A circuit exists if the response contains the operating mode key
207
- # with actual data (not an empty dict).
208
- if not response.get(param_id):
215
+ # with a valid value (not an empty dict, and not None/"---").
216
+ param_data = response.get(param_id)
217
+ if not param_data or param_data.get("value") in (None, "---"):
209
218
  logger.debug(
210
219
  "Circuit %d has no operating mode data (not supported)",
211
220
  circuit,
@@ -230,6 +239,11 @@ class BSBLAN:
230
239
  logger.debug("PPS climate circuit has no operating mode data")
231
240
  self._available_circuits = set()
232
241
  return []
242
+ param_data = response[param_id]
243
+ if param_data.get("value") in (None, "---"):
244
+ logger.debug("PPS climate circuit has invalid operating mode value")
245
+ self._available_circuits = set()
246
+ return []
233
247
  self._available_circuits = {1}
234
248
  return [1]
235
249
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-bsblan
3
- Version: 6.1.2
3
+ Version: 6.1.4
4
4
  Summary: Asynchronous Python client for BSBLAN API
5
5
  Project-URL: Homepage, https://github.com/liudger/python-bsblan
6
6
  Project-URL: Repository, https://github.com/liudger/python-bsblan
@@ -1,15 +1,15 @@
1
1
  bsblan/__init__.py,sha256=u0Dlguh_m6-v8V_inyznaGZsPxPyYMDbYisro_sCtrI,1389
2
2
  bsblan/_temperature.py,sha256=DsxFd6f1EMYKHcrf74ScQk6YqaYuUy0zBPHhiP-C0nY,11366
3
3
  bsblan/_transport.py,sha256=JdySS9D1FJl3F2yeevx2dqo8Cm_pe1GaEpmK5ZnDy2o,7113
4
- bsblan/_validation.py,sha256=-E3CRDI5l3U_1hsEJlH-gz9M_Xjapgqem14BKe0Ub0Q,15554
4
+ bsblan/_validation.py,sha256=PsS7IeQ_IiiNYF6iu1opJJCe6aHPo41kxvSjapV6fjc,15661
5
5
  bsblan/_version.py,sha256=hpeIg9JUswHSorY3iSUERcMC1MzwM9Rpdo1wqeh5rc8,2799
6
- bsblan/bsblan.py,sha256=XvMoo5JJSV-chm4PetaOCMrl-0_bypycO9-Kn29xvSc,55627
6
+ bsblan/bsblan.py,sha256=Q_wOyZmpE-589Su65GitxznMbLx8Pavx4-MBJJcQjXk,56308
7
7
  bsblan/constants.py,sha256=8Wp3t4aqwzlhwINeAYU2tILdkHkIj7XT7GJTqHw6Mss,25235
8
8
  bsblan/exceptions.py,sha256=blAVS0J7jEStLlyH7_5zCSDIrE30eccPP2oqORKhtUU,2212
9
9
  bsblan/models.py,sha256=yJVP78fDxl7i1WxS6EwciBvanXFc87GIxb-lS7AtDLM,22409
10
10
  bsblan/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  bsblan/utility.py,sha256=sS0wWJoqvLAHzwaSLIqQEQ-boHsYFLKAHw8KNTSmdX8,5772
12
- python_bsblan-6.1.2.dist-info/METADATA,sha256=30HcZy9UXhEp26rmJmXm31ODbZVVrpqwQRBYNiPx7fI,9566
13
- python_bsblan-6.1.2.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
14
- python_bsblan-6.1.2.dist-info/licenses/LICENSE.md,sha256=Shv8HPcD1WbZjBPvfb5r3h_cwaPeVaUZMUqU_XQGwGw,1092
15
- python_bsblan-6.1.2.dist-info/RECORD,,
12
+ python_bsblan-6.1.4.dist-info/METADATA,sha256=uQ2RGCYxefhb6OeGHDKi51mQVpzJnizB0t2lBeFV-h8,9566
13
+ python_bsblan-6.1.4.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
14
+ python_bsblan-6.1.4.dist-info/licenses/LICENSE.md,sha256=Shv8HPcD1WbZjBPvfb5r3h_cwaPeVaUZMUqU_XQGwGw,1092
15
+ python_bsblan-6.1.4.dist-info/RECORD,,