plugwise 0.37.4__tar.gz → 0.37.4.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 (32) hide show
  1. {plugwise-0.37.4 → plugwise-0.37.4.1}/PKG-INFO +1 -1
  2. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/__init__.py +6 -7
  3. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/legacy/smile.py +4 -6
  4. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/smile.py +17 -23
  5. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise.egg-info/PKG-INFO +1 -1
  6. {plugwise-0.37.4 → plugwise-0.37.4.1}/pyproject.toml +1 -1
  7. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_init.py +6 -5
  8. {plugwise-0.37.4 → plugwise-0.37.4.1}/LICENSE +0 -0
  9. {plugwise-0.37.4 → plugwise-0.37.4.1}/README.md +0 -0
  10. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/common.py +0 -0
  11. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/constants.py +0 -0
  12. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/data.py +0 -0
  13. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/exceptions.py +0 -0
  14. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/helper.py +0 -0
  15. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/legacy/data.py +0 -0
  16. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/legacy/helper.py +0 -0
  17. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/py.typed +0 -0
  18. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise/util.py +0 -0
  19. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise.egg-info/SOURCES.txt +0 -0
  20. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise.egg-info/dependency_links.txt +0 -0
  21. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise.egg-info/requires.txt +0 -0
  22. {plugwise-0.37.4 → plugwise-0.37.4.1}/plugwise.egg-info/top_level.txt +0 -0
  23. {plugwise-0.37.4 → plugwise-0.37.4.1}/setup.cfg +0 -0
  24. {plugwise-0.37.4 → plugwise-0.37.4.1}/setup.py +0 -0
  25. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_adam.py +0 -0
  26. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_anna.py +0 -0
  27. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_generic.py +0 -0
  28. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_legacy_anna.py +0 -0
  29. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_legacy_generic.py +0 -0
  30. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_legacy_p1.py +0 -0
  31. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_legacy_stretch.py +0 -0
  32. {plugwise-0.37.4 → plugwise-0.37.4.1}/tests/test_p1.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 0.37.4
3
+ Version: 0.37.4.1
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -323,14 +323,13 @@ class Smile(SmileComm):
323
323
  """Set the given Temperature on the relevant Thermostat."""
324
324
  await self._smile_api.set_temperature(loc_id, items)
325
325
 
326
- async def set_number(
327
- self,
328
- key: str,
329
- temperature: float,
330
- dev_id: str | None = None,
331
- ) -> None:
326
+ async def set_number_setpoint(self, key: str, _: str, temperature: float) -> None:
332
327
  """Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
333
- await self._smile_api.set_number(key, temperature, dev_id)
328
+ await self._smile_api.set_number_setpoint(key, temperature)
329
+
330
+ async def set_temperature_offset(self, _: str, dev_id: str, offset: float) -> None:
331
+ """Set the Temperature offset for thermostats that support this feature."""
332
+ await self._smile_api.set_temperature_offset(dev_id, offset)
334
333
 
335
334
  async def set_switch_state(
336
335
  self, appl_id: str, members: list[str] | None, model: str, state: str
@@ -154,12 +154,7 @@ class SmileLegacyAPI(SmileComm, SmileLegacyData):
154
154
  async def set_gateway_mode(self, mode: str) -> None:
155
155
  """Set-function placeholder for legacy devices."""
156
156
 
157
- async def set_number(
158
- self,
159
- key: str,
160
- temperature: float,
161
- dev_id: str | None,
162
- ) -> None:
157
+ async def set_number_setpoint(self, key: str, temperature: float) -> None:
163
158
  """Set-function placeholder for legacy devices."""
164
159
 
165
160
  async def set_preset(self, _: str, preset: str) -> None:
@@ -273,3 +268,6 @@ class SmileLegacyAPI(SmileComm, SmileLegacyData):
273
268
  )
274
269
 
275
270
  await self._request(uri, method="put", data=data)
271
+
272
+ async def set_temperature_offset(self, dev_id: str, offset: float) -> None:
273
+ """Set-function placeholder for legacy devices."""
@@ -182,16 +182,10 @@ class SmileAPI(SmileComm, SmileData):
182
182
 
183
183
  await self._request(uri, method="put", data=data)
184
184
 
185
- async def set_number(
186
- self,
187
- key: str,
188
- temperature: float,
189
- dev_id: str | None,
190
- ) -> None:
191
- """Set the maximum boiler- or DHW-setpoint on the Central Heating boiler or the temperature-offset on a Thermostat."""
192
- if dev_id is not None:
193
- await self.set_offset(dev_id, temperature)
194
- return
185
+ async def set_number_setpoint(self, key: str, temperature: float) -> None:
186
+ """Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
187
+ if key == "max_dhw_temperature":
188
+ key = "domestic_hot_water_setpoint"
195
189
 
196
190
  temp = str(temperature)
197
191
  thermostat_id: str | None = None
@@ -208,19 +202,6 @@ class SmileAPI(SmileComm, SmileData):
208
202
  data = f"<thermostat_functionality><setpoint>{temp}</setpoint></thermostat_functionality>"
209
203
  await self._request(uri, method="put", data=data)
210
204
 
211
- async def set_offset(self, dev_id: str, offset: float) -> None:
212
- """Set the Temperature offset for thermostats that support this feature."""
213
- if dev_id not in self.therms_with_offset_func:
214
- raise PlugwiseError(
215
- "Plugwise: this device does not have temperature-offset capability."
216
- )
217
-
218
- value = str(offset)
219
- uri = f"{APPLIANCES};id={dev_id}/offset;type=temperature_offset"
220
- data = f"<offset_functionality><offset>{value}</offset></offset_functionality>"
221
-
222
- await self._request(uri, method="put", data=data)
223
-
224
205
  async def set_preset(self, loc_id: str, preset: str) -> None:
225
206
  """Set the given Preset on the relevant Thermostat - from LOCATIONS."""
226
207
  if (presets := self._presets(loc_id)) is None:
@@ -432,3 +413,16 @@ class SmileAPI(SmileComm, SmileData):
432
413
  )
433
414
 
434
415
  await self._request(uri, method="put", data=data)
416
+
417
+ async def set_temperature_offset(self, dev_id: str, offset: float) -> None:
418
+ """Set the Temperature offset for thermostats that support this feature."""
419
+ if dev_id not in self.therms_with_offset_func:
420
+ raise PlugwiseError(
421
+ "Plugwise: this device does not have temperature-offset capability."
422
+ )
423
+
424
+ value = str(offset)
425
+ uri = f"{APPLIANCES};id={dev_id}/offset;type=temperature_offset"
426
+ data = f"<offset_functionality><offset>{value}</offset></offset_functionality>"
427
+
428
+ await self._request(uri, method="put", data=data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plugwise
3
- Version: 0.37.4
3
+ Version: 0.37.4.1
4
4
  Summary: Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3.
5
5
  Home-page: https://github.com/plugwise/python-plugwise
6
6
  Author: Plugwise device owners
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "plugwise"
7
- version = "0.37.4"
7
+ version = "0.37.4.1"
8
8
  license = {file = "LICENSE"}
9
9
  description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
10
10
  readme = "README.md"
@@ -873,13 +873,14 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
873
873
  async def tinker_max_boiler_temp(smile):
874
874
  """Change max boiler temp setpoint to test functionality."""
875
875
  new_temp = 60.0
876
+ dev_id = None
876
877
  _LOGGER.info("- Adjusting temperature to %s", new_temp)
877
- for test in ["maximum_boiler_temperature", "bogus_temperature"]:
878
+ for test in ["maximum_boiler_temperature", "max_dhw_temperature", "bogus_temperature"]:
878
879
  try:
879
- await smile.set_number(test, new_temp)
880
- _LOGGER.info(" + tinker_max_boiler_temp worked as intended")
880
+ await smile.set_number_setpoint(test, dev_id, new_temp)
881
+ _LOGGER.info(" + tinker %s worked as intended", test)
881
882
  except pw_exceptions.PlugwiseError:
882
- _LOGGER.info(" + tinker_max_boiler_temp failed as intended")
883
+ _LOGGER.info(" + tinker %s failed as intended", test)
883
884
 
884
885
  @staticmethod
885
886
  async def tinker_temp_offset(smile, dev_id):
@@ -887,7 +888,7 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
887
888
  new_offset = 1.0
888
889
  _LOGGER.info("- Adjusting temperature offset to %s", new_offset)
889
890
  try:
890
- await smile.set_number("dummy", new_offset, dev_id=dev_id)
891
+ await smile.set_temperature_offset("dummy", dev_id, new_offset)
891
892
  _LOGGER.info(" + tinker_temp_offset worked as intended")
892
893
  return True
893
894
  except pw_exceptions.PlugwiseError:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes