Pārlūkot izejas kodu

修复week转换问题

locky 1 gadu atpakaļ
vecāks
revīzija
a87b1033a2
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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) + ','
         # 删除最后一个逗号并返回结果