Skip to content

Commit 7a0fc9a

Browse files
committed
Fix missing comparison method (>=) for EnergyRate
1 parent a6fd529 commit 7a0fc9a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

source/energy_classes.py

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ def __lt__(self, other: EnergyRate) -> bool:
7575
def __gt__(self, other: EnergyRate) -> bool:
7676
return self.rate > other.rate
7777

78+
def __ge__(self, other: EnergyRate) -> bool:
79+
return self.rate >= other.rate
80+
7881

7982
soc_logger = LoggerMixin("StateOfCharge")
8083
battery_capacity = EnergyAmount(int(EnvironmentVariableGetter.get("INVERTER_BATTERY_CAPACITY")))

0 commit comments

Comments
 (0)