We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9479679 commit 932eeb6Copy full SHA for 932eeb6
1 file changed
packages/modules/common/hardware_check.py
@@ -43,7 +43,7 @@ def valid_voltage(voltage) -> bool:
43
(valid_voltage(voltages[0]) and valid_voltage(voltages[1]) and valid_voltage((voltages[2])))):
44
return METER_BROKEN_VOLTAGES.format(voltages)
45
interdependent_values = [sum(counter_state.currents), counter_state.power]
46
- if not (all(v == 0 for v in interdependent_values) or all(v != 0 for v in interdependent_values)):
+ if not (all(abs(v) < 0.5 for v in interdependent_values) or all(abs(v) > 0.5 for v in interdependent_values)):
47
return METER_IMPLAUSIBLE_VALUE.format(counter_state.powers, counter_state.currents, counter_state.voltages)
48
return None
49
0 commit comments