Skip to content

Commit 12d1f2c

Browse files
committed
Replace offset by setpoint, keeping number-dicts equal
1 parent 5d483c3 commit 12d1f2c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

plugwise/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ class ActuatorData(TypedDict, total=False):
470470
"""Actuator data for thermostat types."""
471471

472472
lower_bound: float
473-
offset: float
474473
resolution: float
475474
setpoint: float
476475
setpoint_high: float

plugwise/helper.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,13 +928,16 @@ def _get_actuator_functionalities(self, xml: etree, data: DeviceData) -> None:
928928
if function.text == "nil":
929929
break
930930

931-
temp_dict[key] = format_measure(function.text, TEMP_CELSIUS) # type: ignore [literal-required]
932931
if key == "offset":
933932
# Add limits and resolution for temperature_offset,
934933
# not provided by Plugwise in the XML data
935934
temp_dict["lower_bound"] = -2.0
936935
temp_dict["resolution"] = 0.1
937936
temp_dict["upper_bound"] = 2.0
937+
# Rename offset to setpoint
938+
key = "setpoint"
939+
940+
temp_dict[key] = format_measure(function.text, TEMP_CELSIUS) # type: ignore [literal-required]
938941

939942
if temp_dict:
940943
# If domestic_hot_water_setpoint is present as actuator,

0 commit comments

Comments
 (0)