Explorar o código

修复week转换问题

locky hai 1 ano
pai
achega
a87b1033a2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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) + ','
         # 删除最后一个逗号并返回结果