Skip to content

Commit fc714e1

Browse files
committed
Fix issue reported by SonarCloud
1 parent f8d94bd commit fc714e1

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

plugwise/helper.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -472,13 +472,12 @@ def _get_appl_actuator_modes(
472472
mode_list: list[str] = []
473473
if (
474474
search := search_actuator_functionalities(appliance, actuator_type)
475-
) is not None:
476-
if (modes := search.find("allowed_modes")) is not None:
477-
for mode in modes:
478-
mode_list.append(mode.text)
479-
# Collect cooling_present state from the available regulation_modes
480-
if mode.text == "cooling":
481-
self._cooling_present = True
475+
) is not None and (modes := search.find("allowed_modes")) is not None:
476+
for mode in modes:
477+
mode_list.append(mode.text)
478+
# Collect cooling_present state from the available regulation_modes
479+
if mode.text == "cooling":
480+
self._cooling_present = True
482481

483482
return mode_list
484483

0 commit comments

Comments
 (0)