Skip to content

Commit 49408c5

Browse files
committed
Handle setting and test max_dwh_temperature correctly
1 parent 11e81ae commit 49408c5

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

plugwise/smile.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ async def set_gateway_mode(self, mode: str) -> None:
184184

185185
async def set_number_setpoint(self, key: str, temperature: float) -> None:
186186
"""Set the max. Boiler or DHW setpoint on the Central Heating boiler."""
187+
if key == "max_dhw_temperature":
188+
key = "domestic_hot_water_setpoint"
189+
187190
temp = str(temperature)
188191
thermostat_id: str | None = None
189192
locator = f'appliance[@id="{self._heater_id}"]/actuator_functionalities/thermostat_functionality'

tests/test_init.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -875,12 +875,12 @@ async def tinker_max_boiler_temp(smile):
875875
new_temp = 60.0
876876
dev_id = None
877877
_LOGGER.info("- Adjusting temperature to %s", new_temp)
878-
for test in ["maximum_boiler_temperature", "bogus_temperature"]:
878+
for test in ["maximum_boiler_temperature", "max_dhw_temperature", "bogus_temperature"]:
879879
try:
880880
await smile.set_number_setpoint(test, dev_id, new_temp)
881-
_LOGGER.info(" + tinker_max_boiler_temp worked as intended")
881+
_LOGGER.info(f" + tinker {test} worked as intended")
882882
except pw_exceptions.PlugwiseError:
883-
_LOGGER.info(" + tinker_max_boiler_temp failed as intended")
883+
_LOGGER.info(f" + tinker {test} failed as intended")
884884

885885
@staticmethod
886886
async def tinker_temp_offset(smile, dev_id):

0 commit comments

Comments
 (0)