Skip to content

Commit 3a3bdec

Browse files
committed
Cleanup, improve docstring
1 parent c31e58e commit 3a3bdec

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

plugwise/common.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99

1010
from plugwise.constants import (
1111
ANNA,
12-
GROUP_MEASUREMENTS,
1312
GROUP_TYPES,
14-
LOGGER,
1513
NONE,
1614
PRIORITY_DEVICE_CLASSES,
1715
SPECIAL_PLUG_TYPES,
@@ -23,8 +21,6 @@
2321
from plugwise.util import (
2422
check_heater_central,
2523
check_model,
26-
common_match_cases,
27-
format_measure,
2824
get_vendor_name,
2925
return_valid,
3026
)
@@ -195,15 +191,14 @@ def _entity_switching_group(self, entity: GwEntityData, data: GwEntityData) -> N
195191
def _get_groups(self) -> dict[str, GwEntityData]:
196192
"""Helper-function for smile.py: get_all_gateway_entities().
197193
198-
Collect switching- or pump-group info.
194+
Collect switching-, pumping- or report-group info.
199195
"""
200196
groups: dict[str, GwEntityData] = {}
201197
# P1 and Anna don't have groups
202198
if self.smile.type == "power" or self.check_name(ANNA):
203199
return groups
204200

205201
for group in self._domain_objects.findall("./group"):
206-
group_sensors = {}
207202
members: list[str] = []
208203
group_id = group.attrib["id"]
209204
group_name = group.find("name").text

plugwise/helper.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ def _get_measurement_data(self, entity_id: str) -> GwEntityData:
328328
"""
329329
data: GwEntityData = {"binary_sensors": {}, "sensors": {}, "switches": {}}
330330
entity = self.gw_entities[entity_id]
331-
LOGGER.debug("HOI entity: %s", entity)
332331

333332
# Get P1 smartmeter data from LOCATIONS
334333
smile_is_power = self.smile.type == "power"
@@ -385,7 +384,7 @@ def _collect_group_sensors(
385384
) -> None:
386385
"""Collect group sensors."""
387386
if (group := self._domain_objects.find(f'./group[@id="{entity_id}"]')) is None:
388-
return None
387+
return
389388

390389
for measurement, attrs in measurements.items():
391390
locator = f'.//logs/point_log[type="{measurement}"]/period/measurement'

0 commit comments

Comments
 (0)