Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert removal of set_temperature_offset() #557

Merged
merged 6 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Ongoing

- Revert removal of set_temperature_offset() function.

## v0.37.5

- Add setting the thermostat temperature_offset to the set_number() function.
Expand Down
6 changes: 5 additions & 1 deletion plugwise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,13 @@ async def set_number(
key: str,
temperature: float,
) -> None:
"""Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
"""Set the maximum boiler- or DHW-setpoint on the Central Heating boiler or the temperature-offset on a Thermostat."""
await self._smile_api.set_number(dev_id, key, temperature)

async def set_temperature_offset(self, dev_id: str, offset: float) -> None:
"""Set the Temperature offset for thermostats that support this feature."""
await self._smile_api.set_offset(dev_id, offset) # pragma: no cover

async def set_switch_state(
self, appl_id: str, members: list[str] | None, model: str, state: str
) -> None:
Expand Down
3 changes: 3 additions & 0 deletions plugwise/legacy/smile.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ async def set_number(
) -> None:
"""Set-function placeholder for legacy devices."""

async def set_offset(self, dev_id: str, offset: float) -> None:
"""Set-function placeholder for legacy devices."""

async def set_preset(self, _: str, preset: str) -> None:
"""Set the given Preset on the relevant Thermostat - from DOMAIN_OBJECTS."""
if (presets := self._presets()) is None:
Expand Down
Loading