Skip to content

Commit 4e5d72b

Browse files
committed
Re-adapt _get_regulation_mode()
1 parent e0074a3 commit 4e5d72b

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

plugwise/helper.py

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -536,21 +536,17 @@ def _get_regulation_mode(
536536
) -> None:
537537
"""Helper-function for _get_measurement_data().
538538
539-
Adam: collect the gateway regulation_mode.
539+
Adam gateway: collect the gateway regulation_mode.
540540
"""
541-
if entity_id == self._gateway_id and self._reg_allowed_modes:
542-
if (
543-
mode := self._get_actuator_mode(
544-
appliance, entity_id, "regulation_mode_control_functionality"
545-
)
546-
) is None:
547-
data["select_regulation_mode"] = None
548-
self._count += 1
549-
return
550-
551-
data["select_regulation_mode"] = mode
552-
self._count += 1
541+
if (
542+
mode := self._get_actuator_mode(
543+
appliance, entity_id, "regulation_mode_control_functionality"
544+
)
545+
) is not None:
553546
self._cooling_enabled = mode == "cooling"
547+
if self._reg_allowed_modes:
548+
data["select_regulation_mode"] = mode
549+
self._count += 1
554550

555551
def _get_gateway_mode(
556552
self, appliance: etree.Element, entity_id: str, data: GwEntityData

0 commit comments

Comments
 (0)