plugwise 0.37.3__tar.gz → 0.37.4__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.
- {plugwise-0.37.3 → plugwise-0.37.4}/PKG-INFO +1 -1
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/__init__.py +7 -6
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/legacy/smile.py +6 -4
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/smile.py +24 -15
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise.egg-info/PKG-INFO +1 -1
- {plugwise-0.37.3 → plugwise-0.37.4}/pyproject.toml +1 -1
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_init.py +2 -3
- {plugwise-0.37.3 → plugwise-0.37.4}/LICENSE +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/README.md +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/common.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/constants.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/data.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/exceptions.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/helper.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/legacy/data.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/legacy/helper.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/py.typed +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise/util.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise.egg-info/SOURCES.txt +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise.egg-info/dependency_links.txt +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise.egg-info/requires.txt +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/plugwise.egg-info/top_level.txt +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/setup.cfg +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/setup.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_adam.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_anna.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_generic.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_legacy_anna.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_legacy_generic.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_legacy_p1.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_legacy_stretch.py +0 -0
- {plugwise-0.37.3 → plugwise-0.37.4}/tests/test_p1.py +0 -0
@@ -323,13 +323,14 @@ 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
|
326
|
+
async def set_number(
|
327
|
+
self,
|
328
|
+
key: str,
|
329
|
+
temperature: float,
|
330
|
+
dev_id: str | None = None,
|
331
|
+
) -> None:
|
327
332
|
"""Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
|
328
|
-
await self._smile_api.
|
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)
|
333
|
+
await self._smile_api.set_number(key, temperature, dev_id)
|
333
334
|
|
334
335
|
async def set_switch_state(
|
335
336
|
self, appl_id: str, members: list[str] | None, model: str, state: str
|
@@ -154,7 +154,12 @@ 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
|
157
|
+
async def set_number(
|
158
|
+
self,
|
159
|
+
key: str,
|
160
|
+
temperature: float,
|
161
|
+
dev_id: str | None,
|
162
|
+
) -> None:
|
158
163
|
"""Set-function placeholder for legacy devices."""
|
159
164
|
|
160
165
|
async def set_preset(self, _: str, preset: str) -> None:
|
@@ -268,6 +273,3 @@ class SmileLegacyAPI(SmileComm, SmileLegacyData):
|
|
268
273
|
)
|
269
274
|
|
270
275
|
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,8 +182,17 @@ class SmileAPI(SmileComm, SmileData):
|
|
182
182
|
|
183
183
|
await self._request(uri, method="put", data=data)
|
184
184
|
|
185
|
-
async def
|
186
|
-
|
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
|
195
|
+
|
187
196
|
temp = str(temperature)
|
188
197
|
thermostat_id: str | None = None
|
189
198
|
locator = f'appliance[@id="{self._heater_id}"]/actuator_functionalities/thermostat_functionality'
|
@@ -199,6 +208,19 @@ class SmileAPI(SmileComm, SmileData):
|
|
199
208
|
data = f"<thermostat_functionality><setpoint>{temp}</setpoint></thermostat_functionality>"
|
200
209
|
await self._request(uri, method="put", data=data)
|
201
210
|
|
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
|
+
|
202
224
|
async def set_preset(self, loc_id: str, preset: str) -> None:
|
203
225
|
"""Set the given Preset on the relevant Thermostat - from LOCATIONS."""
|
204
226
|
if (presets := self._presets(loc_id)) is None:
|
@@ -410,16 +432,3 @@ class SmileAPI(SmileComm, SmileData):
|
|
410
432
|
)
|
411
433
|
|
412
434
|
await self._request(uri, method="put", data=data)
|
413
|
-
|
414
|
-
async def set_temperature_offset(self, dev_id: str, offset: float) -> None:
|
415
|
-
"""Set the Temperature offset for thermostats that support this feature."""
|
416
|
-
if dev_id not in self.therms_with_offset_func:
|
417
|
-
raise PlugwiseError(
|
418
|
-
"Plugwise: this device does not have temperature-offset capability."
|
419
|
-
)
|
420
|
-
|
421
|
-
value = str(offset)
|
422
|
-
uri = f"{APPLIANCES};id={dev_id}/offset;type=temperature_offset"
|
423
|
-
data = f"<offset_functionality><offset>{value}</offset></offset_functionality>"
|
424
|
-
|
425
|
-
await self._request(uri, method="put", data=data)
|
@@ -873,11 +873,10 @@ 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
|
877
876
|
_LOGGER.info("- Adjusting temperature to %s", new_temp)
|
878
877
|
for test in ["maximum_boiler_temperature", "bogus_temperature"]:
|
879
878
|
try:
|
880
|
-
await smile.
|
879
|
+
await smile.set_number(test, new_temp)
|
881
880
|
_LOGGER.info(" + tinker_max_boiler_temp worked as intended")
|
882
881
|
except pw_exceptions.PlugwiseError:
|
883
882
|
_LOGGER.info(" + tinker_max_boiler_temp failed as intended")
|
@@ -888,7 +887,7 @@ class TestPlugwise: # pylint: disable=attribute-defined-outside-init
|
|
888
887
|
new_offset = 1.0
|
889
888
|
_LOGGER.info("- Adjusting temperature offset to %s", new_offset)
|
890
889
|
try:
|
891
|
-
await smile.
|
890
|
+
await smile.set_number("dummy", new_offset, dev_id=dev_id)
|
892
891
|
_LOGGER.info(" + tinker_temp_offset worked as intended")
|
893
892
|
return True
|
894
893
|
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|