plugwise 0.37.4__py3-none-any.whl → 0.37.4.1__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.
plugwise/__init__.py CHANGED
@@ -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
plugwise/legacy/smile.py CHANGED
@@ -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."""
plugwise/smile.py CHANGED
@@ -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
@@ -1,17 +1,17 @@
1
- plugwise/__init__.py,sha256=VDmk0QDi3sDHKlzXLEq4SRm9dUwiWqruXvf_6mNTH6o,13810
1
+ plugwise/__init__.py,sha256=A0XCK9xmhzLGSsy0bAGr2tnKfGDUlJ7WzQfeIqCCd8A,14004
2
2
  plugwise/common.py,sha256=P4sUYzgVcFsIR2DmQxeVeOiZvFZWpZXgwHA3XRc1Sx0,12538
3
3
  plugwise/constants.py,sha256=adi2UFHJUcPRWNz1bn155NC9DLzhYbeNriMKTpSyWAg,16574
4
4
  plugwise/data.py,sha256=OTkPJ80b1L1h_TeddfvmUPX1-jBacTjbHKD0XgUIfeg,8965
5
5
  plugwise/exceptions.py,sha256=rymGtWnXosdFkzSehc_41HVl2jXJEg_9Hq9APDEUwrk,1223
6
6
  plugwise/helper.py,sha256=bNT_Tdc0LAxmVZEikMgKm461jeGP-WY-cI1r3JGgIcI,44037
7
7
  plugwise/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- plugwise/smile.py,sha256=YK41CbqMSAQytPOeBiHkXEvinCU5Sm7hDaYUpeqnVCA,17175
8
+ plugwise/smile.py,sha256=2pjpIXIwCRaDdabjZiCiG5a9ErxSfh5xk-glsyxhsiQ,17075
9
9
  plugwise/util.py,sha256=w24CiW-xSV3ARZAeNYZ9T5C4kJpYGCcBoIlX2BhNOYg,6618
10
10
  plugwise/legacy/data.py,sha256=y7gBG9Sg40lltB3B5CpWPtAXggMbcx2IMay-mwvOB1M,2986
11
11
  plugwise/legacy/helper.py,sha256=tSrqA2UeMO7HSYudQHAxBThBTevAOKIxHqN6NCN-r5k,18947
12
- plugwise/legacy/smile.py,sha256=J5y5tIPCz-zpp_4G_TB8II6jy6xNaIJeiAsmxGsondk,10257
13
- plugwise-0.37.4.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
14
- plugwise-0.37.4.dist-info/METADATA,sha256=HF9iqxV-J1vKOXOq7C0BmugM7dCX9qb6o9rx_qkSENw,8939
15
- plugwise-0.37.4.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
16
- plugwise-0.37.4.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
17
- plugwise-0.37.4.dist-info/RECORD,,
12
+ plugwise/legacy/smile.py,sha256=JlJGg2TNl1uBeW-vLzsHzrpeizKpZqN9coiDYcedHuc,10347
13
+ plugwise-0.37.4.1.dist-info/LICENSE,sha256=mL22BjmXtg_wnoDnnaqps5_Bg_VGj_yHueX5lsKwbCc,1144
14
+ plugwise-0.37.4.1.dist-info/METADATA,sha256=nCzwqoFjAaK3Wro085Rs1ALtXGfZP2xzOO9ndX8toXA,8941
15
+ plugwise-0.37.4.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
16
+ plugwise-0.37.4.1.dist-info/top_level.txt,sha256=MYOmktMFf8ZmX6_OE1y9MoCZFfY-L8DA0F2tA2IvE4s,9
17
+ plugwise-0.37.4.1.dist-info/RECORD,,