Skip to content

Commit

Permalink
fix scheduled charging and electricity tariff (openWB#1927)
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel authored Oct 10, 2024
1 parent 95904d8 commit 1768b58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/control/ev.py
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,8 @@ def scheduled_charging_calc_current(self,
message = self.SCHEDULED_CHARGING_CHEAP_HOUR
current = plan_data.available_current
submode = "instant_charging"
elif soc <= limit.soc_limit:
elif ((limit.selected == "soc" and soc <= limit.soc_limit) or
(limit.selected == "amount" and used_amount < limit.amount)):
message = self.SCHEDULED_CHARGING_EXPENSIVE_HOUR
current = min_current
submode = "pv_charging"
Expand Down

0 comments on commit 1768b58

Please sign in to comment.