Skip to content

Commit d85696b

Browse files
committed
Correct roll-over from end to beginning of schedule
1 parent 9f2d79c commit d85696b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise/helper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ def schedules_temps(
150150
today = dt.datetime.now().weekday()
151151
day_0 = schedule_list[i][0]
152152
day_1 = schedule_list[j][0]
153+
# Roll over from end to beginning of schedule = monday
153154
if j < i:
154-
day_1 = schedule_list[i][0] + 2
155+
day_1 = 7 # day 7 = day 0
156+
today += 7
155157
time_0 = schedule_list[i][1]
156158
time_1 = schedule_list[j][1]
157159
if in_between(today, day_0, day_1, now, time_0, time_1):

0 commit comments

Comments
 (0)