python-bsblan 6.1.2__tar.gz → 6.1.3__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 (133) hide show
  1. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/release.yaml +1 -1
  2. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/tests.yaml +1 -1
  3. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/PKG-INFO +1 -1
  4. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/package-lock.json +4 -4
  5. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/package.json +1 -1
  6. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/pyproject.toml +3 -3
  7. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/bsblan.py +16 -2
  8. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_circuit.py +77 -1
  9. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_pps.py +10 -2
  10. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.editorconfig +0 -0
  11. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.gitattributes +0 -0
  12. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/CODE_OF_CONDUCT.md +0 -0
  13. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/CONTRIBUTING.md +0 -0
  14. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/ISSUE_TEMPLATE/PULL_REQUEST_TEMPLATE.md +0 -0
  15. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  16. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  17. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/SECURITY.md +0 -0
  18. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/agents/pr-review.agent.md +0 -0
  19. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/agents/security-reviewer.agent.md +0 -0
  20. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/agents/tdd-refactor.agent.md +0 -0
  21. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/copilot-instructions.md +0 -0
  22. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/hooks/run-validation-after-edits.json +0 -0
  23. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/hooks/run_validation_after_edits.sh +0 -0
  24. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/labels.yml +0 -0
  25. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/prompts/add-parameter.prompt.md +0 -0
  26. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/prompts/code-review.prompt.md +0 -0
  27. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/release-drafter.yml +0 -0
  28. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/renovate.json +0 -0
  29. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/skills/bsblan-parameters/SKILL.md +0 -0
  30. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/skills/bsblan-testing/SKILL.md +0 -0
  31. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/skills/feature-doc-updates/SKILL.md +0 -0
  32. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/auto-approve-renovate.yml +0 -0
  33. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/codeql.yaml +0 -0
  34. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/dependency-review.yaml +0 -0
  35. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/docs.yaml +0 -0
  36. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/labels.yaml +0 -0
  37. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/linting.yaml +0 -0
  38. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/lock.yaml +0 -0
  39. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/pr-labels.yaml +0 -0
  40. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/release-drafter.yaml +0 -0
  41. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/scorecard.yml +0 -0
  42. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/stale.yaml +0 -0
  43. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/workflows/typing.yaml +0 -0
  44. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.github/zizmor.yml +0 -0
  45. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.gitignore +0 -0
  46. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.nvmrc +0 -0
  47. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.pre-commit-config.yaml +0 -0
  48. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.prettierignore +0 -0
  49. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/.yamllint +0 -0
  50. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/AGENTS.md +0 -0
  51. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/CLAUDE.md +0 -0
  52. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/LICENSE.md +0 -0
  53. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/Makefile +0 -0
  54. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/README.md +0 -0
  55. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/docs/api/client.md +0 -0
  56. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/docs/api/constants.md +0 -0
  57. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/docs/api/exceptions.md +0 -0
  58. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/docs/api/models.md +0 -0
  59. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/docs/getting-started.md +0 -0
  60. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/docs/index.md +0 -0
  61. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/examples/control.py +0 -0
  62. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/examples/discovery.py +0 -0
  63. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/examples/fetch_param.py +0 -0
  64. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/examples/profile_init.py +0 -0
  65. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/examples/ruff.toml +0 -0
  66. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/examples/speed_test.py +0 -0
  67. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/mkdocs.yml +0 -0
  68. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/sonar-project.properties +0 -0
  69. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/__init__.py +0 -0
  70. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/_temperature.py +0 -0
  71. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/_transport.py +0 -0
  72. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/_validation.py +0 -0
  73. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/_version.py +0 -0
  74. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/constants.py +0 -0
  75. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/exceptions.py +0 -0
  76. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/models.py +0 -0
  77. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/py.typed +0 -0
  78. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/src/bsblan/utility.py +0 -0
  79. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/__init__.py +0 -0
  80. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/conftest.py +0 -0
  81. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/device.json +0 -0
  82. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/dict_version.json +0 -0
  83. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/hot_water_state.json +0 -0
  84. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/info.json +0 -0
  85. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/password.txt +0 -0
  86. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/pps_device.json +0 -0
  87. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/pps_state.json +0 -0
  88. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/pps_static_values.json +0 -0
  89. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/sensor.json +0 -0
  90. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/state.json +0 -0
  91. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/state_circuit2.json +0 -0
  92. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/static_state.json +0 -0
  93. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/static_state_circuit2.json +0 -0
  94. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/thermostat_hvac.json +0 -0
  95. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/thermostat_temp.json +0 -0
  96. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/fixtures/time.json +0 -0
  97. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/ruff.toml +0 -0
  98. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_api_initialization.py +0 -0
  99. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_api_validation.py +0 -0
  100. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_auth.py +0 -0
  101. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_backoff_retry.py +0 -0
  102. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_bsblan.py +0 -0
  103. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_bsblan_edge_cases.py +0 -0
  104. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_configuration.py +0 -0
  105. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_constants.py +0 -0
  106. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_context_manager.py +0 -0
  107. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_device.py +0 -0
  108. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_dhw_time_switch.py +0 -0
  109. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_entity_info.py +0 -0
  110. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_entity_info_ha.py +0 -0
  111. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_heating_schedule.py +0 -0
  112. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_hot_water_additional.py +0 -0
  113. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_hotwater_state.py +0 -0
  114. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_include_parameter.py +0 -0
  115. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_info.py +0 -0
  116. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_initialization.py +0 -0
  117. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_read_parameters.py +0 -0
  118. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_reset_validation.py +0 -0
  119. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_schedule_models.py +0 -0
  120. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_sensor.py +0 -0
  121. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_set_heating_schedule.py +0 -0
  122. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_set_hot_water_schedule.py +0 -0
  123. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_set_hotwater.py +0 -0
  124. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_state.py +0 -0
  125. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_static_state.py +0 -0
  126. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_temperature_unit.py +0 -0
  127. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_temperature_validation.py +0 -0
  128. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_thermostat.py +0 -0
  129. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_time.py +0 -0
  130. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_utility.py +0 -0
  131. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_utility_additional.py +0 -0
  132. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_utility_edge_cases.py +0 -0
  133. {python_bsblan-6.1.2 → python_bsblan-6.1.3}/tests/test_version_errors.py +0 -0
@@ -59,7 +59,7 @@ jobs:
59
59
  verbose: true
60
60
  print-hash: true
61
61
  - name: ✍️ Sign published artifacts
62
- uses: sigstore/gh-action-sigstore-python@04cffa1d795717b140764e8b640de88853c92acc # v3.3.0
62
+ uses: sigstore/gh-action-sigstore-python@5b79a39c381910c090341a2c9b0bf022c8b387e1 # v3.4.0
63
63
  with:
64
64
  inputs: ./dist/*.tar.gz ./dist/*.whl
65
65
  release-signing-artifacts: false
@@ -101,7 +101,7 @@ jobs:
101
101
  - name: SonarQube Cloud Scan
102
102
  if: env.HAS_SONAR_TOKEN == 'true' && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork)
103
103
  # yamllint disable-line rule:line-length
104
- uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1
104
+ uses: SonarSource/sonarqube-scan-action@713881670b6b3676cda39549040e2d88c70d582e # v8.2
105
105
  env:
106
106
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
107
107
  SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-bsblan
3
- Version: 6.1.2
3
+ Version: 6.1.3
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
@@ -12,13 +12,13 @@
12
12
  "url-parse": "1.5.10"
13
13
  },
14
14
  "devDependencies": {
15
- "prettier": "3.8.3"
15
+ "prettier": "3.8.4"
16
16
  }
17
17
  },
18
18
  "node_modules/prettier": {
19
- "version": "3.8.3",
20
- "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.3.tgz",
21
- "integrity": "sha512-7igPTM53cGHMW8xWuVTydi2KO233VFiTNyF5hLJqpilHfmn8C8gPf+PS7dUT64YcXFbiMGZxS9pCSxL/Dxm/Jw==",
19
+ "version": "3.8.4",
20
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.8.4.tgz",
21
+ "integrity": "sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==",
22
22
  "dev": true,
23
23
  "license": "MIT",
24
24
  "bin": {
@@ -9,7 +9,7 @@
9
9
  "author": "WJL van Rootselaar <liudgervr@gmail.com>",
10
10
  "license": "MIT",
11
11
  "devDependencies": {
12
- "prettier": "3.8.3"
12
+ "prettier": "3.8.4"
13
13
  },
14
14
  "dependencies": {
15
15
  "url-parse": "1.5.10"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-bsblan"
3
- version = "6.1.2"
3
+ version = "6.1.3"
4
4
  description = "Asynchronous Python client for BSBLAN API"
5
5
  authors = [
6
6
  {name = "Willem-Jan van Rootselaar", email = "liudgervr@gmail.com"}
@@ -189,7 +189,7 @@ dev = [
189
189
  "blacken-docs==1.20.0",
190
190
  "codespell==2.4.2",
191
191
  "covdefaults==2.3.0",
192
- "coverage==7.14.0",
192
+ "coverage==7.14.1",
193
193
  "darglint==1.8.1",
194
194
  "flake8==7.3.0",
195
195
  "flake8-simplify==0.30.0",
@@ -206,7 +206,7 @@ dev = [
206
206
  "pytest-xdist>=3.8.0",
207
207
  "pyupgrade==3.21.2",
208
208
  "ruff==0.15.16",
209
- "safety==3.7.0",
209
+ "safety==3.8.1",
210
210
  "vulture==2.16",
211
211
  "yamllint==1.38.0",
212
212
  "zeroconf>=0.148.0",
@@ -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
 
@@ -13,7 +13,12 @@ import pytest
13
13
  from aresponses import Response, ResponsesMockServer
14
14
 
15
15
  from bsblan import BSBLAN, BSBLANConfig, State, StaticState
16
- from bsblan.constants import CircuitConfig, ErrorMsg, build_api_config
16
+ from bsblan.constants import (
17
+ MIN_SUPPORTED_JSON_API,
18
+ CircuitConfig,
19
+ ErrorMsg,
20
+ build_api_config,
21
+ )
17
22
  from bsblan.exceptions import BSBLANError, BSBLANInvalidParameterError
18
23
  from bsblan.utility import APIValidator
19
24
 
@@ -769,6 +774,77 @@ async def test_get_available_circuits_all_probes_missing(
769
774
  ] == expected_params
770
775
 
771
776
 
777
+ @pytest.mark.asyncio
778
+ async def test_get_available_circuits_inactive_marker_excludes_circuit(
779
+ mock_bsblan_circuit: BSBLAN,
780
+ ) -> None:
781
+ """Test a circuit whose probe value is "---" is excluded."""
782
+ bsblan = mock_bsblan_circuit
783
+
784
+ async def mock_request(
785
+ **kwargs: Any,
786
+ ) -> dict[str, Any]:
787
+ params = kwargs.get("params", {})
788
+ param_id = params.get("Parameter", "")
789
+ if param_id == "700":
790
+ return {"700": {"value": "1", "unit": "", "desc": "Automatic"}}
791
+ # HC2 reports the inactive marker value
792
+ if param_id == "1000":
793
+ return {"1000": {"value": "---", "unit": "", "desc": ""}}
794
+ msg = f"Unexpected parameter probe: {param_id}"
795
+ raise AssertionError(msg)
796
+
797
+ bsblan._request = AsyncMock(side_effect=mock_request) # type: ignore[method-assign]
798
+
799
+ circuits = await bsblan.get_available_circuits()
800
+ assert circuits == [1]
801
+ assert bsblan._available_circuits == {1}
802
+
803
+
804
+ @pytest.mark.asyncio
805
+ async def test_get_available_circuits_none_value_excludes_circuit(
806
+ mock_bsblan_circuit: BSBLAN,
807
+ ) -> None:
808
+ """Test a circuit whose probe value is None is excluded."""
809
+ bsblan = mock_bsblan_circuit
810
+
811
+ async def mock_request(
812
+ **kwargs: Any,
813
+ ) -> dict[str, Any]:
814
+ params = kwargs.get("params", {})
815
+ param_id = params.get("Parameter", "")
816
+ if param_id == "700":
817
+ return {"700": {"value": "1", "unit": "", "desc": "Automatic"}}
818
+ if param_id == "1000":
819
+ return {"1000": {"value": None, "unit": "", "desc": ""}}
820
+ msg = f"Unexpected parameter probe: {param_id}"
821
+ raise AssertionError(msg)
822
+
823
+ bsblan._request = AsyncMock(side_effect=mock_request) # type: ignore[method-assign]
824
+
825
+ circuits = await bsblan.get_available_circuits()
826
+ assert circuits == [1]
827
+ assert bsblan._available_circuits == {1}
828
+
829
+
830
+ @pytest.mark.asyncio
831
+ async def test_get_available_circuits_json_api_v1_skips_discovery(
832
+ mock_bsblan_circuit: BSBLAN,
833
+ ) -> None:
834
+ """Test that JSON-API version 1.0 skips circuit discovery and returns [1]."""
835
+ bsblan = mock_bsblan_circuit
836
+ bsblan._json_api_version = MIN_SUPPORTED_JSON_API
837
+
838
+ request_mock = AsyncMock()
839
+ bsblan._request = request_mock # type: ignore[method-assign]
840
+
841
+ circuits = await bsblan.get_available_circuits()
842
+
843
+ assert circuits == [1]
844
+ assert bsblan._available_circuits == {1}
845
+ request_mock.assert_not_awaited()
846
+
847
+
772
848
  @pytest.mark.asyncio
773
849
  async def test_temperature_range_skips_unavailable_discovered_circuit(
774
850
  mock_bsblan_circuit: BSBLAN,
@@ -357,12 +357,20 @@ async def test_pps_circuit_discovery_returns_single_climate(
357
357
 
358
358
 
359
359
  @pytest.mark.asyncio
360
- @pytest.mark.parametrize("response", [{}, {"15000": {}}])
360
+ @pytest.mark.parametrize(
361
+ "response",
362
+ [
363
+ {},
364
+ {"15000": {}},
365
+ {"15000": {"value": "---", "unit": "", "desc": ""}},
366
+ {"15000": {"value": None, "unit": "", "desc": ""}},
367
+ ],
368
+ )
361
369
  async def test_pps_circuit_discovery_returns_empty_without_mode(
362
370
  pps_bsblan: BSBLAN,
363
371
  response: dict[str, Any],
364
372
  ) -> None:
365
- """Test PPS circuit discovery handles missing operating mode data."""
373
+ """Test PPS circuit discovery handles missing or inactive mode data."""
366
374
  pps_bsblan._request = AsyncMock(return_value=response) # type: ignore[method-assign]
367
375
 
368
376
  circuits = await pps_bsblan.get_available_circuits()
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes