Skip to content

Commit 732d737

Browse files
AJediIAmgithub-actions[bot]
authored andcommitted
chore: format code with ruff
1 parent da0b965 commit 732d737

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

custom_components/luxtronik/common.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,30 +100,31 @@ def correct_key_value(
100100
if (
101101
sensor_id == LC.C0080_STATUS
102102
and value == LuxOperationMode.no_request
103-
and bool(get_sensor_data(sensors, LC.C0119_STATUS_LINE_3) == LuxStatus3Option.cooling.value)
103+
and bool(
104+
get_sensor_data(sensors, LC.C0119_STATUS_LINE_3)
105+
== LuxStatus3Option.cooling.value
106+
)
104107
):
105108
return LuxOperationMode.cooling
106109
# endregion Workaround Detect passive cooling operation mode
107110
# region Workaround Detect active cooling operation mode
108111
if (
109112
sensor_id == LC.C0080_STATUS
110113
and value == LuxOperationMode.no_request
111-
and bool(get_sensor_data(sensors, LC.C0119_STATUS_LINE_3) in LuxStatus3Option.heating.value)
114+
and bool(
115+
get_sensor_data(sensors, LC.C0119_STATUS_LINE_3)
116+
in LuxStatus3Option.heating.value
117+
)
112118
):
113119
T_in = get_sensor_data(sensors, LC.C0010_FLOW_IN_TEMPERATURE)
114120
T_out = get_sensor_data(sensors, LC.C0011_FLOW_OUT_TEMPERATURE)
115121
T_heat_in = get_sensor_data(sensors, LC.C0204_HEAT_SOURCE_INPUT_TEMPERATURE)
116122
T_heat_out = get_sensor_data(sensors, LC.C0024_HEAT_SOURCE_OUTPUT_TEMPERATURE)
117123
Flow_WQ = get_sensor_data(sensors, LC.C0173_HEAT_SOURCE_FLOW_RATE)
118124
Pump = get_sensor_data(sensors, LC.C0043_PUMP_FLOW)
119-
if (
120-
(T_out > T_in)
121-
and (T_heat_out > T_heat_in)
122-
and (Flow_WQ > 0)
123-
and Pump
124-
):
125+
if (T_out > T_in) and (T_heat_out > T_heat_in) and (Flow_WQ > 0) and Pump:
125126
return LuxOperationMode.cooling
126-
# endregion Workaround Detect active cooling operation mode
127+
# endregion Workaround Detect active cooling operation mode
127128

128129
# no changes needed, return sensor value
129130
return value

0 commit comments

Comments
 (0)