python-qube-heatpump 1.4.6__tar.gz → 1.4.8__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 (28) hide show
  1. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/PKG-INFO +1 -1
  2. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/pyproject.toml +1 -1
  3. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/client.py +3 -1
  4. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/entities/sensors.py +2 -4
  5. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/tests/test_client.py +7 -7
  6. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  7. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  8. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  9. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/.github/workflows/ci.yml +0 -0
  10. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/.github/workflows/python-publish.yml +0 -0
  11. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/.gitignore +0 -0
  12. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/AGENTS.md +0 -0
  13. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/CLAUDE.md +0 -0
  14. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/LICENSE +0 -0
  15. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/README.md +0 -0
  16. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/pytest.ini +0 -0
  17. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/__init__.py +0 -0
  18. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/const.py +0 -0
  19. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/entities/__init__.py +0 -0
  20. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/entities/base.py +0 -0
  21. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/entities/binary_sensors.py +0 -0
  22. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/entities/switches.py +0 -0
  23. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/models.py +0 -0
  24. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/src/python_qube_heatpump/py.typed +0 -0
  25. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/tests/conftest.py +0 -0
  26. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/tests/test_const.py +0 -0
  27. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/tests/test_entities.py +0 -0
  28. {python_qube_heatpump-1.4.6 → python_qube_heatpump-1.4.8}/tests/test_models.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-qube-heatpump
3
- Version: 1.4.6
3
+ Version: 1.4.8
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.4.6"
7
+ version = "1.4.8"
8
8
  authors = [
9
9
  { name="MattieGit", email="6250046+MattieGit@users.noreply.github.com" },
10
10
  ]
@@ -448,7 +448,9 @@ class QubeClient:
448
448
  entity.address, int(write_value), device_id=self.unit
449
449
  )
450
450
  else:
451
- _LOGGER.warning("Unsupported data type for writing: %s", entity.data_type)
451
+ _LOGGER.warning(
452
+ "Unsupported data type for writing: %s", entity.data_type
453
+ )
452
454
  return False
453
455
 
454
456
  if result.isError():
@@ -122,8 +122,7 @@ _SENSOR_DEFS: tuple[EntityDef, ...] = (
122
122
  data_type=DataType.FLOAT32,
123
123
  platform=Platform.SENSOR,
124
124
  unit="%",
125
- scale=-100.0,
126
- offset=100.0,
125
+ scale=100.0,
127
126
  ),
128
127
  EntityDef(
129
128
  key="aout_srcpmp_val",
@@ -133,8 +132,7 @@ _SENSOR_DEFS: tuple[EntityDef, ...] = (
133
132
  data_type=DataType.FLOAT32,
134
133
  platform=Platform.SENSOR,
135
134
  unit="%",
136
- scale=-100.0,
137
- offset=100.0,
135
+ scale=100.0,
138
136
  ),
139
137
  EntityDef(
140
138
  key="aout_srcvalve_val",
@@ -24,13 +24,12 @@ async def test_read_value(mock_modbus_client):
24
24
  mock_instance.connected = True
25
25
 
26
26
  # Mock response for reading holding registers (FLOAT32)
27
- # 24.5 = 0x41C40000 -> 16836 (0x41C4), 0 (0x0000) (Big Endian)
28
- # Our decoder expects [0, 16836] for Little Endian Word Order?
29
- # Logic in client.py: int_val = (regs[1] << 16) | regs[0]
30
- # To get 0x41C40000: regs[1]=0x41C4, regs[0]=0x0000
27
+ # 24.5 = 0x41C40000 -> Big Endian word order (ABCD)
28
+ # Logic in client.py: int_val = (regs[0] << 16) | regs[1]
29
+ # regs[0]=0x41C4=16836 (MSW), regs[1]=0x0000=0 (LSW)
31
30
  mock_resp = MagicMock()
32
31
  mock_resp.isError.return_value = False
33
- mock_resp.registers = [0, 16836]
32
+ mock_resp.registers = [16836, 0]
34
33
 
35
34
  mock_instance.read_holding_registers = AsyncMock(return_value=mock_resp)
36
35
  client._client = mock_instance
@@ -80,10 +79,11 @@ async def test_read_sensor(mock_modbus_client):
80
79
  mock_instance = mock_modbus_client.return_value
81
80
 
82
81
  # Mock response for temp_supply (FLOAT32) = 35.5°C
83
- # 35.5 = 0x420E0000 -> regs[1]=0x420E=16910, regs[0]=0x0000
82
+ # 35.5 = 0x420E0000 -> Big Endian word order (ABCD)
83
+ # regs[0]=0x420E=16910 (MSW), regs[1]=0x0000=0 (LSW)
84
84
  mock_resp = MagicMock()
85
85
  mock_resp.isError.return_value = False
86
- mock_resp.registers = [0, 16910]
86
+ mock_resp.registers = [16910, 0]
87
87
 
88
88
  mock_instance.read_input_registers = AsyncMock(return_value=mock_resp)
89
89
  client._client = mock_instance