Skip to content

Commit 046576f

Browse files
kvanbiesengithub-actions[bot]
authored andcommitted
chore: ruff autofix
1 parent 5833aa6 commit 046576f

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

custom_components/cardata/soc_prediction.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ def update_ac_charging_data(
11611161
if aux_power_kw is not None:
11621162
session.last_aux_power = aux_power_kw
11631163

1164-
'''
1164+
"""
11651165
# Calculate power if we have both voltage and current
11661166
if session.last_voltage and session.last_current and session.last_voltage > 0 and session.last_current > 0:
11671167
power_kw = (session.last_voltage * session.last_current) / 1000.0
@@ -1180,15 +1180,17 @@ def update_ac_charging_data(
11801180
# Update power reading (accumulates energy)
11811181
self.update_power_reading(vin, power_kw, aux_power_kw or 0.0)
11821182
return True
1183-
'''
1183+
"""
11841184
# Calculate power if we have both voltage and current
11851185
if session.last_voltage and session.last_current and session.last_voltage > 0 and session.last_current > 0:
11861186
# Raw input Power calculation without phase multiplier, for logging and energy tracking
11871187
input_power_kw = (session.last_voltage * session.last_current) / 1000.0
11881188

11891189
# phase multiplier
11901190
if session.phases and session.phases > 1:
1191-
input_power_kw *= 3.0 if session.last_voltage < 250 else 1.732 # 3x for 3-phase low-voltage, √3 for 3-phase high-voltage
1191+
input_power_kw *= (
1192+
3.0 if session.last_voltage < 250 else 1.732
1193+
) # 3x for 3-phase low-voltage, √3 for 3-phase high-voltage
11921194

11931195
obc_efficiency = 0.94
11941196
fixed_load_kw = 0.3

0 commit comments

Comments
 (0)