|
@@ -1315,7 +1315,11 @@ class SmartSceneView(View):
|
|
|
next_day = 1 if is_next_day else 0
|
|
|
for i, bit in enumerate(bin_str):
|
|
|
if bit == '1':
|
|
|
- weeks += str(i+next_day) + ','
|
|
|
+ # 7 -> 0
|
|
|
+ week = i + next_day
|
|
|
+ if week == 7:
|
|
|
+ week = 0
|
|
|
+ weeks += str(week) + ','
|
|
|
# 删除最后一个逗号并返回结果
|
|
|
return weeks[:-1]
|
|
|
|