Skip to content

Commit d39e61d

Browse files
committed
Improve comment
1 parent 94a10fe commit d39e61d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugwise/helper.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,12 +931,13 @@ def _control_state(self, data: GwEntityData, loc_id: str) -> str | bool:
931931
if (ctrl_state := location.find(locator)) is not None:
932932
return str(ctrl_state.text)
933933

934-
# control_state not present in regulation_mode off (issue #776)
934+
# Handle missing control_state in regulation_mode off for firmware >= 3.2.0 (issue #776)
935+
# In newer firmware versions, default to "off" when control_state is not present
935936
if self.smile_version is not None:
936937
if self.smile_version >= version.parse("3.2.0"):
937938
return "off"
938939

939-
# Older Adam firmware does not have the control_state key
940+
# Older Adam firmware does not have the control_state xml-key
940941
# Work around this by comparing the reported temperature and setpoint for a location
941942
setpoint = data["sensors"]["setpoint"]
942943
temperature = data["sensors"]["temperature"]

0 commit comments

Comments
 (0)