Skip to content

Commit cb01d8b

Browse files
committed
Add extra testing to set_temperature_offset()
1 parent 46a119b commit cb01d8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugwise/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,11 @@ async def set_number_setpoint(self, key: str, _: str, temperature: float) -> Non
734734

735735
async def set_temperature_offset(self, _: str, dev_id: str, offset: float) -> None:
736736
"""Set the Temperature offset for thermostats that support this feature."""
737+
if dev_id not in self.therms_with_offset_func:
738+
raise PlugwiseError(
739+
"Plugwise: this device does not have temperature-offset capability."
740+
)
741+
737742
value = str(offset)
738743
uri = f"{APPLIANCES};id={dev_id}/offset;type=temperature_offset"
739744
data = f"<offset_functionality><offset>{value}</offset></offset_functionality>"

0 commit comments

Comments
 (0)