python-qube-heatpump 1.16.0__tar.gz → 1.16.1__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 (37) hide show
  1. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/PKG-INFO +1 -1
  2. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/pyproject.toml +1 -1
  3. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/client.py +4 -2
  4. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_client.py +17 -0
  5. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  6. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  7. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  8. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/.github/workflows/ci.yml +0 -0
  9. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/.github/workflows/python-publish.yml +0 -0
  10. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/.gitignore +0 -0
  11. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/AGENTS.md +0 -0
  12. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/CLAUDE.md +0 -0
  13. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/LICENSE +0 -0
  14. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/README.md +0 -0
  15. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/docs/modbus-lijst-qube-totaal.pdf +0 -0
  16. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/pytest.ini +0 -0
  17. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/__init__.py +0 -0
  18. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/const.py +0 -0
  19. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/entities/__init__.py +0 -0
  20. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/entities/base.py +0 -0
  21. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/entities/binary_sensors.py +0 -0
  22. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/entities/sensors.py +0 -0
  23. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/entities/switches.py +0 -0
  24. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/mdns.py +0 -0
  25. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/models.py +0 -0
  26. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/network.py +0 -0
  27. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/src/python_qube_heatpump/py.typed +0 -0
  28. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/conftest.py +0 -0
  29. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_client_batching.py +0 -0
  30. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_client_read_all.py +0 -0
  31. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_client_resilience.py +0 -0
  32. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_client_writes.py +0 -0
  33. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_const.py +0 -0
  34. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_entities.py +0 -0
  35. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_mdns.py +0 -0
  36. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_models.py +0 -0
  37. {python_qube_heatpump-1.16.0 → python_qube_heatpump-1.16.1}/tests/test_network.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: python-qube-heatpump
3
- Version: 1.16.0
3
+ Version: 1.16.1
4
4
  Summary: Async Modbus client for Qube Heat Pumps
5
5
  Project-URL: Homepage, https://github.com/MattieGit/python-qube-heatpump
6
6
  Project-URL: Bug Tracker, https://github.com/MattieGit/python-qube-heatpump/issues
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "python-qube-heatpump"
7
- version = "1.16.0"
7
+ version = "1.16.1"
8
8
  authors = [
9
9
  { name="MattieGit", email="6250046+MattieGit@users.noreply.github.com" },
10
10
  ]
@@ -394,10 +394,12 @@ class QubeClient:
394
394
  Reads InputRegister 77 (GeneralMng.Softversion).
395
395
 
396
396
  Returns:
397
- Version as string (e.g., "2.15"), or None on error.
397
+ Version as string (e.g., "2.15"), or None on error or when the
398
+ register reads 0 (it is not populated on some firmware, e.g.
399
+ 4.1.00; use ``async_get_device_info`` for the panel version).
398
400
  """
399
401
  value = await self.read_value(const.SOFTWARE_VERSION)
400
- if value is None:
402
+ if not value:
401
403
  return None
402
404
  return f"{value:.2f}"
403
405
 
@@ -246,6 +246,23 @@ async def test_get_software_version(mock_modbus_client):
246
246
  assert isinstance(result, str)
247
247
 
248
248
 
249
+ @pytest.mark.asyncio
250
+ async def test_get_software_version_zero(mock_modbus_client):
251
+ """Test an unpopulated register (reads 0) returns None, not "0.00"."""
252
+ client = QubeClient("1.2.3.4", 502)
253
+ mock_instance = mock_modbus_client.return_value
254
+
255
+ mock_resp = MagicMock()
256
+ mock_resp.isError.return_value = False
257
+ mock_resp.registers = [0, 0]
258
+
259
+ mock_instance.read_input_registers = AsyncMock(return_value=mock_resp)
260
+ client._client = mock_instance
261
+
262
+ result = await client.async_get_software_version()
263
+ assert result is None
264
+
265
+
249
266
  @pytest.mark.asyncio
250
267
  async def test_get_software_version_error(mock_modbus_client):
251
268
  """Test software version returns None on error."""