Skip to content

Commit f72847c

Browse files
authored
Merge pull request #557 from plugwise/revert-removal
Revert removal of set_temperature_offset()
2 parents 24308b2 + 23d91c4 commit f72847c

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## Ongoing
4+
5+
- Revert removal of set_temperature_offset() function.
6+
37
## v0.37.5
48

59
- Add setting the thermostat temperature_offset to the set_number() function.

plugwise/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,13 @@ async def set_number(
329329
key: str,
330330
temperature: float,
331331
) -> None:
332-
"""Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
332+
"""Set the maximum boiler- or DHW-setpoint on the Central Heating boiler or the temperature-offset on a Thermostat."""
333333
await self._smile_api.set_number(dev_id, key, temperature)
334334

335+
async def set_temperature_offset(self, dev_id: str, offset: float) -> None:
336+
"""Set the Temperature offset for thermostats that support this feature."""
337+
await self._smile_api.set_offset(dev_id, offset) # pragma: no cover
338+
335339
async def set_switch_state(
336340
self, appl_id: str, members: list[str] | None, model: str, state: str
337341
) -> None:

plugwise/legacy/smile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ async def set_number(
162162
) -> None:
163163
"""Set-function placeholder for legacy devices."""
164164

165+
async def set_offset(self, dev_id: str, offset: float) -> None:
166+
"""Set-function placeholder for legacy devices."""
167+
165168
async def set_preset(self, _: str, preset: str) -> None:
166169
"""Set the given Preset on the relevant Thermostat - from DOMAIN_OBJECTS."""
167170
if (presets := self._presets()) is None:

0 commit comments

Comments
 (0)