Skip to content

Commit 473ce3b

Browse files
author
autoruff
committed
fixup: gateway_id_test Python code fixed using ruff
1 parent 5abb7ab commit 473ce3b

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

plugwise/common.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,18 @@
3232
class SmileCommon:
3333
"""The SmileCommon class."""
3434

35-
#def __init__(self) -> None:
35+
# def __init__(self) -> None:
3636
# """Init."""
37-
#self._appliances: etree
38-
#self._count: int
39-
#self._domain_objects: etree
40-
#self._cooling_present: bool
41-
#self._heater_id: str
42-
#self._on_off_device: bool
43-
#self._opentherm_device: bool
44-
#self.gw_entities: dict[str, GwEntityData]
45-
#self.smile_name: str
46-
#self.smile_type: str
37+
# self._appliances: etree
38+
# self._count: int
39+
# self._domain_objects: etree
40+
# self._cooling_present: bool
41+
# self._heater_id: str
42+
# self._on_off_device: bool
43+
# self._opentherm_device: bool
44+
# self.gw_entities: dict[str, GwEntityData]
45+
# self.smile_name: str
46+
# self.smile_type: str
4747

4848
def smile(self, name: str) -> bool:
4949
"""Helper-function checking the smile-name."""

plugwise/smile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ def _update_for_cooling(self, entity: GwEntityData) -> None:
271271
sensors["setpoint_high"] = temp_dict["setpoint_high"]
272272
self._count += 2 # add 4, remove 2
273273

274-
275274
def _all_appliances(self) -> None:
276275
"""Collect all appliances with relevant info.
277276
@@ -363,7 +362,9 @@ def _get_p1_smartmeter_info(self) -> None:
363362
appl.zigbee_mac = None
364363

365364
# Replace the entity_id of the gateway by the smartmeter location_id
366-
self.gw_entities[self._home_loc_id] = self.gw_entities.pop(self._gateway_id["gateway_id"])
365+
self.gw_entities[self._home_loc_id] = self.gw_entities.pop(
366+
self._gateway_id["gateway_id"]
367+
)
367368
self._gateway_id["gateway_id"] = self._home_loc_id
368369

369370
self._create_gw_entities(appl)

0 commit comments

Comments
 (0)