Skip to content

Commit 1d0d5b6

Browse files
committed
Improve comment, move function
1 parent 7d99881 commit 1d0d5b6

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

plugwise/helper.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ def _get_appliances(self) -> None:
145145
elif appl.pwclass not in THERMOSTAT_CLASSES:
146146
appl.location = self._home_loc_id
147147

148-
# Don't show orphaned thermostat-types
148+
# Don't show orphaned (no location) thermostat-types
149149
if appl.pwclass in THERMOSTAT_CLASSES and appl.location is None:
150150
continue
151151

@@ -316,17 +316,6 @@ def _get_appl_actuator_modes(
316316

317317
return mode_list
318318

319-
def _get_appliances_with_offset_functionality(self) -> list[str]:
320-
"""Helper-function collecting all appliance that have offset_functionality."""
321-
therm_list: list[str] = []
322-
offset_appls = self._domain_objects.findall(
323-
'.//actuator_functionalities/offset_functionality[type="temperature_offset"]/offset/../../..'
324-
)
325-
for item in offset_appls:
326-
therm_list.append(item.get("id"))
327-
328-
return therm_list
329-
330319
def _get_zone_data(self, loc_id: str, zone: GwEntityData) -> None:
331320
"""Helper-function for smile.py: _get_entity_data().
332321

plugwise/smile.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@ def get_all_gateway_entities(self) -> None:
116116
self._get_groups()
117117
self._all_entity_data()
118118

119+
def _get_appliances_with_offset_functionality(self) -> list[str]:
120+
"""Helper-function collecting all appliance that have offset_functionality."""
121+
therm_list: list[str] = []
122+
offset_appls = self._domain_objects.findall(
123+
'.//actuator_functionalities/offset_functionality[type="temperature_offset"]/offset/../../..'
124+
)
125+
for item in offset_appls:
126+
therm_list.append(item.get("id"))
127+
128+
return therm_list
129+
119130
async def async_update(self) -> dict[str, GwEntityData]:
120131
"""Perform an full update: re-collect all gateway entities and their data and states.
121132

0 commit comments

Comments
 (0)