Skip to content
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
14 changes: 8 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# Changelog

## V0.37.4
## v0.37.5

- Combine set_temperature_offset() with set_number()
- Fix typo in manual_fixtures.py script
- Add setting the thermostat temperature_offset to the set_number() function.
- Fix typo in manual_fixtures.py script.

## v0.37.4 - not released

## v0.37.3

- Fix for [plugwise-beta #620](https://github.com/plugwise/plugwise-beta/issues/620)
- Fix for [plugwise-beta #620](https://github.com/plugwise/plugwise-beta/issues/620).

## v0.37.2

- Code improvements
- Remove unused dependencies from pyproject.toml
- Code improvements.
- Remove unused dependencies from pyproject.toml.

## V0.37.1

Expand Down
4 changes: 2 additions & 2 deletions plugwise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ async def set_temperature(self, loc_id: str, items: dict[str, float]) -> None:

async def set_number(
self,
dev_id: str,
key: str,
temperature: float,
dev_id: str | None = None,
) -> None:
"""Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
await self._smile_api.set_number(key, temperature, dev_id)
await self._smile_api.set_number(dev_id, key, temperature)

async def set_switch_state(
self, appl_id: str, members: list[str] | None, model: str, state: str
Expand Down
2 changes: 1 addition & 1 deletion plugwise/legacy/smile.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ async def set_gateway_mode(self, mode: str) -> None:

async def set_number(
self,
dev_id: str,
key: str,
temperature: float,
dev_id: str | None,
) -> None:
"""Set-function placeholder for legacy devices."""

Expand Down
4 changes: 2 additions & 2 deletions plugwise/smile.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,12 @@ async def set_gateway_mode(self, mode: str) -> None:

async def set_number(
self,
dev_id: str,
key: str,
temperature: float,
dev_id: str | None,
) -> None:
"""Set the maximum boiler- or DHW-setpoint on the Central Heating boiler or the temperature-offset on a Thermostat."""
if dev_id is not None:
if key == "temperature_offset":
await self.set_offset(dev_id, temperature)
return

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "plugwise"
version = "0.37.4"
version = "0.37.5"
license = {file = "LICENSE"}
description = "Plugwise Smile (Adam/Anna/P1) and Stretch module for Python 3."
readme = "README.md"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ async def tinker_max_boiler_temp(smile):
_LOGGER.info("- Adjusting temperature to %s", new_temp)
for test in ["maximum_boiler_temperature", "bogus_temperature"]:
try:
await smile.set_number(test, new_temp)
await smile.set_number("dummy", test, new_temp)
_LOGGER.info(" + tinker_max_boiler_temp worked as intended")
except pw_exceptions.PlugwiseError:
_LOGGER.info(" + tinker_max_boiler_temp failed as intended")
Expand All @@ -887,7 +887,7 @@ async def tinker_temp_offset(smile, dev_id):
new_offset = 1.0
_LOGGER.info("- Adjusting temperature offset to %s", new_offset)
try:
await smile.set_number("dummy", new_offset, dev_id=dev_id)
await smile.set_number(dev_id, "temperature_offset", new_offset)
_LOGGER.info(" + tinker_temp_offset worked as intended")
return True
except pw_exceptions.PlugwiseError:
Expand Down