Skip to content

Commit 6c44c35

Browse files
committed
Simplify
1 parent f35bdfe commit 6c44c35

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plugwise/helper.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,7 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch:
457457
return None
458458

459459
# Find the valid heater_central
460-
if (result := self._check_heater_central()) is None:
461-
return None
462-
self._heater_id = result
460+
self._heater_id = self._check_heater_central()
463461

464462
# Info for On-Off device
465463
if self._on_off_device:
@@ -502,7 +500,7 @@ def _appliance_info_finder(self, appliance: etree, appl: Munch) -> Munch:
502500

503501
return appl
504502

505-
def _check_heater_central(self) -> str | None:
503+
def _check_heater_central(self) -> str:
506504
"""Find the valid heater_central, helper-function for _appliance_info_finder().
507505
508506
Solution for Core Issue #104433,
@@ -523,7 +521,6 @@ def _check_heater_central(self) -> str | None:
523521
if hc_count > 1:
524522
for item in hc_list:
525523
for key, value in item.items():
526-
heater_central_id = None
527524
if value:
528525
heater_central_id = key
529526
# Stop when a valid id is found

0 commit comments

Comments
 (0)