Skip to content

Commit

Permalink
Correction of non-continuous scheduling.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasbkarlsson authored Jan 21, 2025
1 parent 1048d90 commit 65c6e0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/ev_smart_charging/helpers/coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@ def get_lowest_quarters_non_continuous(
i
for i in range(len(prices))
if prices[i] == highest_selected_price
and (i // 4) == (selected_quarters[-1] // 4)
and ((i + time_start_index) // 4)
== ((selected_quarters[-1] + time_start_index) // 4)
]
if same_hour_quarters[0] - 1 in selected_quarters:
# If the quarter before "same_hour_quarters" selected, then do nothing.
Expand Down

0 comments on commit 65c6e0f

Please sign in to comment.