소스 검색

修复week转换问题

locky 1 년 전
부모
커밋
a87b1033a2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Controller/SensorGateway/SmartSceneController.py

+ 2 - 2
Controller/SensorGateway/SmartSceneController.py

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